You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/07/27 16:38:22 UTC

DO NOT REPLY [Bug 11231] New: - Stack corruption under MSVC 7.0 DLL

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11231

Stack corruption under MSVC 7.0 DLL

           Summary: Stack corruption under MSVC 7.0 DLL
           Product: XalanC
           Version: 1.3.x
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: XPathC
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: roy.kiesler@teamsybase.com


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.