Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-589

Bug with pattern restriction on long strings

    Details

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

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

        Attachments

        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

            People

            • Assignee:
              knoaman@ca.ibm.com Khaled Noaman
              Reporter:
              morpheus@smi.stanford.edu Mark Woon
            • Votes:
              14 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: