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=22196>. 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=22196 Mismatch allocation and deallocation functions Summary: Mismatch allocation and deallocation functions Product: XalanC Version: 1.6 Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: XalanC AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] On line 163 of URISupport.C: const XalanArrayAutoPtr<XalanDOMChar> theFullPathGuard (XMLPlatformUtils::getFullPath(c_wstr(urlString))); However, XMLPlatformUtils::getFullPath no necessarily allocates and returns an array of XalanDOMChar, it return memory allocated by the default memory manager, which uses "::operator new(size)". This means that the above code effectively mixes malloc() with delete[](). I believe that XALAN_USING_XERCES(ArrayJanitor); ArrayJanitor<XalanDOMChar> theFullPathGuard(XMLPlatformUtils::getFullPath (c_wstr(urlString)),XMLPlatformUtils::fgMemoryManager); Is better. There may be other occurences of this problem, basically all memory allocated and returned by Xerces will have come from the new allocator. Dan
