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

Crash in XalanTransformer::transform() if extra parenthesis is in XSL.

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.11
    • None
    • XalanC
    • None
    • RedHat Linux 7

    Description

      Hi,

      I ran into an issue where I am getting a crash during a transform because of a syntax error in the XSL. I am expecting the transformer to report an error instead of a crash. To reproduce the crash:

      1. Edit the SimpleTransform.cpp file located in xalan-c-1.11/c/samples/SimpleTransform to call my crash.xml and crash.xsl files.

      2. Run the transform and see the SIGABRT generated (if compiled in debug mode):
      SimpleTransform: /apps/uadev/tfuas/Dev/build/xalan-c-1.11/c/src/xalanc/XalanDOM/XalanDOMString.cpp:72: xalanc_1_11::XalanDOMString::XalanDOMString(const XalanDOMChar*, xercesc_3_1::MemoryManager&, xalanc_1_11::XalanDOMString::size_type): Assertion `theString != 0' failed.
      Abort

      If not compiled in debug mode, it crashes with a SEGV.

      3. The crash is because the following line in the XSL:
      <xsl:value-of select="(string($var1_resultof_first/@ID)"/>
      should be:
      <xsl:value-of select="string($var1_resultof_first/@ID)"/>

      Thanks,
      Chad

      Attachments

        1. crash_stack.txt
          9 kB
          Chad Rosenquist
        2. SimpleTransform.cpp
          4 kB
          Chad Rosenquist
        3. crash.xsl
          0.8 kB
          Chad Rosenquist
        4. crash.xml
          0.5 kB
          Chad Rosenquist

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            shathaway Steven J. Hathaway
            ChadRosenquist Chad Rosenquist

            Dates

              Created:
              Updated:

              Slack

                Issue deployment