JDK-6449928 : For api/xml_schema/msxsdtest throw OOM due to too big values of maxOccurs or minOccurs
  • Type: Bug
  • Component: xml
  • Sub-Component: org.xml.sax
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-07-18
  • Updated: 2012-04-25
  • Resolved: 2006-09-05
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 b96Fixed
Related Reports
Relates :  
Relates :  
Description
JCK            : JCK6.0 b28
J2SE           : FAIL - mustang b91
Platform[s]    : FAIL - seems to be all
switch/Mode    : FAIL - default

Four JCK 6.0 b28 tests:
api/xml_schema/msxsdtest/element/elemJ003.html#elemJ003                                   api/xml_schema/msxsdtest/element/elemJ011.html#elemJ011                                   api/xml_schema/msxsdtest/wildCards/wildB011.html#wildB011                                 api/xml_schema/msxsdtest/wildCards/wildB019.html#wildB019                                 

throw OutOfMemoryException in b91:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at com.sun.org.apache.xerces.internal.impl.dtd.models.CMStateSet.<init>(CMStateSet.java:102)
	at com.sun.org.apache.xerces.internal.impl.dtd.models.CMNode.firstPos(CMNode.java:98)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:684)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:675)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:675)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:675)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:675)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:676)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.calcFollowList(XSDFACM.java:675)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.buildDFA(XSDFACM.java:398)
	at com.sun.org.apache.xerces.internal.impl.xs.models.XSDFACM.<init>(XSDFACM.java:182)
	at com.sun.org.apache.xerces.internal.impl.xs.models.CMBuilder.createDFACM(CMBuilder.java:132)
	at com.sun.org.apache.xerces.internal.impl.xs.models.CMBuilder.getContentModel(CMBuilder.java:92)
	at com.sun.org.apache.xerces.internal.impl.xs.XSComplexTypeDecl.getContentModel(XSComplexTypeDecl.java:153)
	at com.sun.org.apache.xerces.internal.impl.xs.XSConstraints.fullSchemaChecking(XSConstraints.java:421)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:526)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:485)
	at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:206)
	at javasoft.sqe.tests.api.xml.schema.TestRun.parseSchemaDoc(TestRun.java:316)
	at javasoft.sqe.tests.api.xml.schema.TestRun.runPositiveTest(TestRun.java:251)
	at javasoft.sqe.tests.api.xml.schema.TestRun.run(TestRun.java:119)
	at javasoft.sqe.tests.api.xml.schema.TestRun.setLogsAndRun(TestRun.java:342)


These tests were faild due to CR 4674384 previously. In mustang build b81 this CR was integrated as JDK limitation for maxOccurs and minOccurs values. Most of the tests now throw error "Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000." (see CR 6428524). Unfortunately these four tests now throw OutOfMemoryException

Comments
EVALUATION Algorithm should be change to use constant space, otherwise it is natural for it to run out of heap or stack space for large values of maxOccurs.
21-07-2006