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

Xalan programs fail when compiled with -NDEBUG flag

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.1.x
    • Fix Version/s: None
    • Component/s: XPathC
    • Labels:
      None
    • Environment:
      Operating System: Linux
      Platform: PC
    • Bugzilla Id:
      1846

      Description

      Bad things happen when the following two conditions are met:
      1. xalan-c 1.1 and xerces-c 1.4 have been compiled WITHOUT the -NDEBUG=1 flag
      2. A program,which is linked against that xalan library, is compiled WITH the
      -NDEBUG=1 option.

      Namely, such a program will die with a SIGSEGV. It seems there is some sort of
      stack problem with the passing of variable references. I am using g++ 2.95.2 on
      SuSE Linux. The segmentation fault happens in the expression that's returned
      from the method in #0 (below). Here is gdb output, including a stack trace, of
      the dying code (note the changes in the context and executionContext arguments
      between #1 and #0):

      (gdb) bt
      #0 0x4023eb69 in SimpleNodeLocator::locationPath (this=0x12, xpath=@0x12,
      executionContext=@0xbfffebb4, context=@0x12, opPos=2)
      at XPath/SimpleNodeLocator.cpp:144
      #1 0x4024f1de in XPath::locationPath (this=0x80b2dd8, context=0x8091430,
      opPos=18, executionContext=@0x12) at XPath/XPath.cpp:1224
      #2 0x4024ac6a in XPath::executeMore (this=0x80b2dd8, context=0x8091430,
      opPos=2, executionContext=@0xbfffebb4) at XPath/XPath.cpp:322
      #3 0x4024a2bc in XPath::executeMore (this=0x80b2dd8, context=0x8091430,
      opPos=0, executionContext=@0xbfffebb4) at XPath/XPath.cpp:205
      #4 0x40249e2a in XPath::execute (this=0x80b2dd8, executionContext=@0xbfffebb4)
      at XPath/XPath.cpp:148
      #5 0x40249ec4 in XPath::execute (this=0x80b2dd8, context=0x12,
      prefixResolver=@0x80b2d2c, executionContext=@0xbfffebb4) at XPath/XPath.cpp:169
      #6 0x402cdfe6 in ElemTemplateElement::transformSelectedChildren
      (this=0x80b2d28, executionContext=@0xbfffebb4, stylesheetTree=@0x80c41a0,
      xslInstruction=@0x80b2d28, theTemplate=0x0, sourceTree=0x8091430,
      sourceNodeContext=0x8091430, mode=@0xbfffe9e4, selectPattern=0x80b2dd8,
      xslToken=50, selectStackFrameIndex=3) at XSLT/ElemTemplateElement.cpp:648
      #7 0x402a938a in ElemApplyTemplates::execute (this=0x80b2d28,
      executionContext=@0xbfffebb4, sourceTree=0x8091430, sourceNode=0x8091430,
      mode=@0xbfffe9e4) at XSLT/ElemApplyTemplates.cpp:188
      #8 0x402ccadb in ElemTemplateElement::executeChildren (this=0x80b2d28,
      executionContext=@0xbfffebb4, sourceTree=0x8091430,
      sourceNode=0x8091430, mode=@0xbfffe9e4) at XSLT/ElemTemplateElement.cpp:289
      #9 0x402cbb5a in ElemTemplate::execute (this=0x80c8910,
      executionContext=@0xbfffebb4, sourceTree=0x8091430, sourceNode=0x8091430,
      mode=@0xbfffe9e4) at XSLT/ElemTemplate.cpp:170
      #10 0x4031ab53 in StylesheetRoot::process (this=0xbfffe9e4,
      sourceTree=0x8091430, outputTarget=@0x12, executionContext=@0xbfffebb4) at
      XSLT/StylesheetRoot.cpp:229
      #11 0x40326ad3 in XSLTEngineImpl::process (this=0xbfffed18,
      inputSource=@0xbffff028, stylesheetSource=@0xbffff040, outputTarget=@0x12,
      constructionContext=@0xbfffecf8, executionContext=@0xbfffebb4) at
      XSLT/XSLTEngineImpl.cpp:396
      #12 0x8050b83 in giaXT::transform (this=0xbffff3fc) at giaXT.cpp:97
      #13 0x804fc4e in main (argc=9, argv=0xbffff57c) at giaXT_CLI.cpp:70
      #14 0x40601baf in __libc_start_main () from /lib/libc.so.6

        Attachments

          Activity

            People

            • Assignee:
              david_n_bertoni@lotus.com David Bertoni
              Reporter:
              matt@granularity.com Matt Leinhos
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: