Bug 6129 - SAXParser hangs on invalid XML file
Summary: SAXParser hangs on invalid XML file
Status: NEW
Alias: None
Product: Xerces-J
Classification: Unclassified
Component: SAX (show other bugs)
Version: 1.4.4
Hardware: PC All
: P3 critical
Target Milestone: ---
Assignee: Xerces-J Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-30 15:55 UTC by Joeseph Zeldin
Modified: 2005-03-20 17:06 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joeseph Zeldin 2002-01-30 15:55:07 UTC
Java code:

  SAXParser saxParser = new SAXParser ();

  saxParser.setFeature ("http://xml.org/sax/features/validation", false);
  saxParser.setFeature ("http://xml.org/sax/features/namespaces", false);
  saxParser.setFeature ("http://apache.org/xml/features/validation/schema", 
false);
  saxParser.setFeature ("http://apache.org/xml/features/validation/schema-full-
checking", false);
  saxParser.setFeature ("http://apache.org/xml/features/validation/dynamic", 
false);
  saxParser.setFeature ("http://apache.org/xml/features/allow-java-encodings", 
true       );
  saxParser.setFeature ("http://apache.org/xml/features/continue-after-fatal-
error", true);
  saxParser.setFeature ("http://apache.org/xml/features/nonvalidating/load-dtd-
grammar", false);
  saxParser.setFeature ("http://apache.org/xml/features/nonvalidating/load-
external-dtd", false);

  saxParser.parse (args[0]);

XML file:

<?xml version="1.0" ?><element>ausdyauysd</element

Parser hangs:

"Signal Dispatcher" daemon prio=10 tid=0x7ed080 nid=0x5a0 waiting on monitor 
[0..0]

"Finalizer" daemon prio=9 tid=0x7ea5f8 nid=0x5f4 waiting on monitor 
[0x8c4f000..0x8c4fdc4]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" daemon prio=10 tid=0x8990ad8 nid=0x5e0 waiting on monitor 
[0x8c0f000..0x8c0fdc4]

        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Unknown Source)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

"main" prio=5 tid=0x234428 nid=0x474 runnable [0x6f000..0x6fc3c]
        at 
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher.dispatch
(XMLDocumen
tScanner.java:1456)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentScanner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1139)
        at Parser.main(Parser.java:19)

"VM Thread" prio=5 tid=0x23f980 nid=0x3a0 runnable

"VM Periodic Task Thread" prio=10 tid=0x894738 nid=0x5d8 waiting on monitor