Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-1243

java.lang.StackOverflowError in XString.equals()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7.1
    • XPath
    • None
    • Operating System: Solaris
      Platform: Sun
    • 13851
    • PatchAvailable

    Description

      In some special cases I get a StackOverflowError in method equals(XMLString),
      line #444 [ if (!obj2.hasString()) return obj2.equals(this); ]

      I think this can occur if to XStringForChars-objects are compared, and both
      objects haven't been used before. Than the hasString()-method of
      XStringForChars returns false for both, resulting in an endless loop.

      I patched XStringForChars method hasString() to return always true,
      which works for me.

      Don't know if this is the right way to solve this bug.

      Attachments

        1. patch.j1243.txt
          4 kB
          Henry Zongaro
        2. ASF.LICENSE.NOT.GRANTED--xalan-stack-overflow.zip
          2 kB
          Martini Roberto
        3. ASF.LICENSE.NOT.GRANTED--1.xsl
          9 kB
          Bruno Verachten
        4. ASF.LICENSE.NOT.GRANTED--1.xml
          18 kB
          Bruno Verachten

        Issue Links

          Activity

            People

              zongaro@ca.ibm.com Henry Zongaro
              wolfram.eisert@dresdner-bank.com Wolfram
              Brian Minchau Brian Minchau
              Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: