Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-544

Assert failure, then crash, during "variable undefined" error recovery in certain circumstances.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: CurrentCVS
    • Component/s: XalanC
    • Labels:
      None
    • Environment:
      win2k on ix86

      Description

      Consirer the following stylesheet (the actual input document does not matter):

      <?xml version="1.0" encoding = "ISO-8859-1"?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common">
      <xsl:template match="/">
      <xsl:call-template name="T1">
      <xsl:with-param name="arg1" select="."/>
      <xsl:with-param name="arg2" select="$foobar"/><!-- not defined -->
      </xsl:call-template>
      </xsl:template>

      <xsl:template name="T1">
      <xsl:param name="arg1" select="."/>
      <xsl:param name="arg2"/>
      </xsl:template>
      </xsl:stylesheet>

      If you run Xalan with this stylesheet in Debug mode, you get the following message:
      Assertion failed: m_referenceCount == 0, file xalan-1-9-0\src\xalanc\PlatformSupport\XalanReferenceCountedObject.cpp, line 43
      In Release mode, Xalan just crashes.
      Note that if you remove the first "xsl:with-param" element, then Xalan correctly prints the expected error:
      XSLT Error: The variable 'foobar' is not defined.Source tree node: #document. (file://stylesheet.xslt, line 5, column 50.)
      Apparently, this is a regression w.r.t. Xalan 1.8.
      Best regards,
      Alain Le Guennec

        Attachments

        1. patch.txt
          0.5 kB
          David N Bertoni

          Activity

            People

            • Assignee:
              dbertoni David N Bertoni
              Reporter:
              aleguenn@free.fr Alain Le Guennec
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: