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

Bug with pattern restriction on long strings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.10.0
    • None
    • Operating System: All
      Platform: All
    • 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. ASF.LICENSE.NOT.GRANTED--test.xml
          2 kB
          Mark Woon
        2. ASF.LICENSE.NOT.GRANTED--test.xsd
          2 kB
          Mark Woon
        3. RegularExpression.java
          135 kB
          Geoff Granum
        4. RegularExpression.java
          106 kB
          Nick Sydenham
        5. RegularExpression.java
          33 kB
          aaron pieper
        6. test.zip
          0.8 kB
          Andy O'Brien

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: