Pattern matching failes with stack-overflow
-------------------------------------------

                 Key: XERCESJ-1217
                 URL: http://issues.apache.org/jira/browse/XERCESJ-1217
             Project: Xerces2-J
          Issue Type: Bug
          Components: XML Schema datatypes
    Affects Versions: 2.9.0
         Environment: WinXP (but issue is platform agnostic)
            Reporter: Derek Denny-Brown


The X3D schema includes the pattern "((\+|\-)?(0|[1-9][0-9]*)?( )?(,)?( )?)*" 
to represent a list of optionally comma separated integers.  it is not uncommon 
for there to be long lists, even to thousands of entries.  Xerces validation 
fails with a stack-overflow at ~200 entries on my development machine, which is 
~1% of the worst case value (derived from the W3C EXI test data).  One such 
example that is easy to find the the classic 'teapot' expressed in x3d (google: 
teapot.x3d).  The XSD for X3D can be found at 
http://www.web3d.org/x3d/specifications/.

The problem seems to stem from recursion in Op.CLOSURE and Op.UNION in 
org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Context con, 
Op op, int offset, int dx, int opts)

This effectively blocks the ability to use Xerces2-J to validate real-world X3D 
documents

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to