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

Stack corruption under MSVC 7.0 DLL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.3.x
    • Fix Version/s: None
    • Component/s: XPathC
    • Labels:
      None
    • Environment:
      Operating System: Windows NT/2K
      Platform: PC
    • Bugzilla Id:
      11231

      Description

      The DLL initializes and terminates Xalan from its DLLMain, as follows:

      case DLL_PROCESS_ATTACH:

      { // Perform per-process parser initialization. // Must be called first in any client code. XMLPlatformUtils::Initialize(); break; }

      case DLL_PROCESS_DETACH:

      { XMLPlatformUtils::Terminate(); break; }

      My XPath evaluation method starts with:

      XalanSourceTreeDOMSupport xds;
      XalanSourceTreeParserLiaison xspl( xds );
      xds.setParserLiaison( &xspl );
      XPathEvaluator::initialize();

      and ends post-processing with:

      XPathEvaluator::terminate();

      When the DLL method returns, I get the following:

      Run-Time Check Failure #2 - Stack around the variable 'xds' was corrupted.

      I tried adding the following before returning from the method:

      xspl.reset();
      xds.reset();

      ... no gold. The executable code example does not manifest this behavior – is
      there something about being called from a DLL that causes this? I know Xalan-C
      is not thread-safe, but this is a single-process, single-thread DLL.

      I can provide the .cpp and .hpp files for my DLL and class upon request.

      Thanks for looking into this.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              roy.kiesler@teamsybase.com roncon
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: