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=24639>. 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=24639 Xalan crashes at exit because of Xerces-MemoryManager and static XSLTInputSource Summary: Xalan crashes at exit because of Xerces-MemoryManager and static XSLTInputSource Product: XalanC Version: 1.5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: XalanC AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I'm not sure what I am doing wrong, but the Xalan-Executable for Version 1.5 crashes on our Sun Solaris and Linux machines during exit. Even just running Xalan without commandline arguments prints the usage and then reports a Memory Fault. We are using Xerces 2.3 and Xalan 1.5 on a Red Hat Advanced Server Developers Edition 2.1 with gcc 2.96 and on Sun Solaris 2.8 with CC 5.2 Update 1. I debugged the problem and found that the problem is reported during destruction of a static XSLTInputSource in XalanTransformer.cpp, the stack-trace is: #0 0x408d8774 in xercesc_2_3::InputSource::~InputSource (this=0x406fbde0, __in_chrg=0) at InputSource.cpp:111 #1 0x405701b9 in xalanc_1_5::XSLTInputSource::~XSLTInputSource (this=0x406fbde0, __in_chrg=2) at _string.h:355 #2 0x40480a4a in __static_initialization_and_destruction_0 (__initialize_p=0, __priority=65535) at _algobase.h:136 #3 0x40480a85 in global destructors keyed to xalanc_1_5::XalanTransformer::s_xsltInit () at /dcaclearcase/vobs/eParty/xml-xalan/c/lib/Linux_D/../../src/XalanTransformer/XalanTransformer.cpp:366 #4 0x403906eb in __do_global_dtors_aux () from ./libxalan-c1_5_0.so #5 0x405796f1 in _fini () from ./libxalan-c1_5_0.so #6 0x4000df32 in _dl_fini () at dl-fini.c:169 #7 0x40ba753b in exit (status=-1) at exit.c:54 #8 0x40b92660 in __libc_start_main (main=0x804b1dc <main>, argc=1, ubp_av=0xbffeae54, init=0x804a190 <_init>, fini=0x804c858 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffeae4c) at ../sysdeps/generic/libc-start.c:129 I saw that the MemoryManager in the underlying Xerces-InputSource is set to null when we get to the destructor and therefore it crashes in the destructor ~InputSource(). I think this is a problem of using a static object derived from InputSource that requires an initialized Xerces-MemoryManager, but cannot get one because during construction of the static-object the MemoryManager is not yet initialized through XMLPlatform::initalize()! I will attach a small testapplication that shows the problem for me.
