JDK-6309988 : CTE_REGTEST/Generic/4935093/DosTest.java fails
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-08-11
  • Updated: 2024-11-19
  • Resolved: 2005-12-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b61Fixed
Related Reports
Relates :  
Description
JDK        	    : Fails On:   Mustang b46
                      Passes On:  Mustang b45
Platform[s]         : Fails On:  win2000 Pro
Failing Test [s]    : CTE_REGTEST/Generic/4935093/DosTest.java

    Test source location:
    =====================
/net/jdk/export/jpse04/Regression/1.6.0/test/CTE_REGTEST/Generic/4935093/DosTest.java

    jtr file location:
    ==================
/net/cady/export6/results/mustang/b46/reg/regression-cte-reg-mustang-win2000-2005-08-08-17-58-05-0887/workDir/CTE_REGTEST/Generic/4935093/DosTest.jtr

    How to reproduce:
    ====================
    - Set JAVA_HOME to Mustang b46 windows-i586
    - cd /net/jdk/export/jpse04/Regression/1.6.0/test/CTE_REGTEST/Generic/4935093     
    - /net/koori.sfbay/onestop/jct-tools/2.1.6/archive/fcs/binaries/win32/bin/jtreg -r:/tmp -w:/tmp DosTest.java

    Test output:
    =============
----------System.out:(2/93)----------
 inflated: DosTest.xml
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl@1027b4d
----------System.err:(1/34)----------
java full version "1.6.0-ea-b46"
result: Failed. Execution failed: exit code 1

Comments
EVALUATION Fix will be available in b61.
10-11-2005

SUGGESTED FIX Index: SecurityManager.java =================================================================== RCS file: /cvs/jaxp-sources/xml-xerces/java/src/com/sun/org/apache/xerces/internal/util/SecurityManager.java,v retrieving revision 1.2 diff -u -r1.2 SecurityManager.java --- SecurityManager.java 16 Aug 2005 22:49:14 -0000 1.2 +++ SecurityManager.java 9 Nov 2005 09:16:27 -0000 @@ -85,7 +85,7 @@ private final static int DEFAULT_ENTITY_EXPANSION_LIMIT = 64000; /** Default value of number of nodes created. **/ - private final static int DEFAULT_MAX_OCCUR_NODE_LIMIT = 3000; + private final static int DEFAULT_MAX_OCCUR_NODE_LIMIT = 5000; // // Data Index: XMLDocumentFragmentScannerImpl.java =================================================================== RCS file: /cvs/jaxp-sources/xml-xerces/java/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java,v retrieving revision 1.4 diff -u -r1.4 XMLDocumentFragmentScannerImpl.java --- XMLDocumentFragmentScannerImpl.java 3 Nov 2005 17:54:05 -0000 1.4 +++ XMLDocumentFragmentScannerImpl.java 9 Nov 2005 09:25:12 -0000 @@ -1308,6 +1308,13 @@ fAddDefaultAttr = true; do { scanAttribute(fAttributes); + if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ + fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, + "ElementAttributeLimit", + new Object[]{rawname, new Integer(fAttributes.getLength()) }, + XMLErrorReporter.SEVERITY_FATAL_ERROR ); + } + } while (!seekCloseOfStartTag()); fReadingAttributes=false; } Index: XMLMessages.properties =================================================================== RCS file: /cvs/jaxp-sources/xml-xerces/java/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties,v retrieving revision 1.3 diff -u -r1.3 XMLMessages.properties --- XMLMessages.properties 26 Sep 2005 13:02:30 -0000 1.3 +++ XMLMessages.properties 9 Nov 2005 09:18:34 -0000 @@ -290,3 +290,5 @@ #Application can set the limit of number of entities that should be expanded by the parser. EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application. +# Application can set the limit of number of attributes of entity that should be expanded by the parser. +ElementAttributeLimit= Element \"{0}\" has more than \"{1}\" attributes, \"{1}\" is the limit imposed by the application. Index: XMLNSDocumentScannerImpl.java =================================================================== RCS file: /cvs/jaxp-sources/xml-xerces/java/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java,v retrieving revision 1.5 diff -u -r1.5 XMLNSDocumentScannerImpl.java --- XMLNSDocumentScannerImpl.java 3 Nov 2005 17:54:04 -0000 1.5 +++ XMLNSDocumentScannerImpl.java 9 Nov 2005 09:25:57 -0000 @@ -272,6 +272,13 @@ fAddDefaultAttr = true; do { scanAttribute(fAttributes); + if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){ + fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, + "ElementAttributeLimit", + new Object[]{rawname, new Integer(fAttributes.getLength()) }, + XMLErrorReporter.SEVERITY_FATAL_ERROR ); + } + } while (!seekCloseOfStartTag()); fReadingAttributes=false; }
10-11-2005