xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Granum (JIRA)" <xerces-j-...@xml.apache.org>
Subject [jira] Updated: (XERCESJ-589) Bug with pattern restriction on long strings
Date Mon, 25 Feb 2008 04:32:51 GMT

     [ https://issues.apache.org/jira/browse/XERCESJ-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Geoff Granum updated XERCESJ-589:
---------------------------------

    Attachment: RegularExpression.java

I wrote this patch quite a while ago and then stalled out re-writing a test suite to work
with 1.3 (from 1.5). I ran it against the xmlschema2006-11-06 package. It exposed one new
bug which is an even more extreme edge case than this. The conversation is on the mailing
list: 

http://mail-archives.apache.org/mod_mbox/xerces-j-dev/200707.mbox/%3COF91A8D40B.56D4BE1C-ON85257313.0011DDA4-85257313.00158EEC@ca.ibm.com%3E


While I feel I tested this fairly well I would not be comfortable giving a go ahead for commit
directly. For one, I just pulled it off the shelf and dusted it off after a few months of
neglect. Also, there are some debug  comments in the attached code, from me trying to work
out how to fix the new OOM bug mentioned above.

So, if someone wants to adopt a working, tested but not fully trusted* patch, this is for
you. 

If I could swear that I would have time to jump on it again I would clean up those printlines
before posting, but I'm and have been swamped. But rather than let it lie around...

* I don't know the package very well, so am likely more paranoid than even the normal devs

> Bug with pattern restriction on long strings
> --------------------------------------------
>
>                 Key: XERCESJ-589
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-589
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema Structures
>    Affects Versions: 2.3.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Mark Woon
>         Attachments: RegularExpression.java, RegularExpression.java, RegularExpression.java,
test.xml, test.xsd, test.zip
>
>
> There is a bug with applying a pattern restriction on long strings while trying
> to validate an XML file against a schema.  I'm including an xml file and xsd
> file that demonstrates this problem.  One character less in <sequence> and the
> problem does not occur.
> As it is, I'm getting
> java.lang.StackOverflowError
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
>         at
> org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Mime
View raw message