Xerces2-J
  1. Xerces2-J
  2. XERCESJ-589

Bug with pattern restriction on long strings

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.10.0
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      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)
      ...

      1. test.zip
        0.8 kB
        Andy O'Brien
      2. RegularExpression.java
        33 kB
        aaron pieper
      3. RegularExpression.java
        106 kB
        Nick Sydenham
      4. RegularExpression.java
        135 kB
        Geoff Granum
      5. ASF.LICENSE.NOT.GRANTED--test.xsd
        2 kB
        Mark Woon
      6. ASF.LICENSE.NOT.GRANTED--test.xml
        2 kB
        Mark Woon

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Khaled Noaman
            Reporter:
            Mark Woon
          • Votes:
            14 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development