You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David Schulze <da...@delorme.com> on 2002/11/06 21:23:02 UTC
RE: DO NOT REPLY [Bug 14311] New: - delete [] of char * from XM
LString::transcode() fails
Perhaps this is related to something we have seen at my company. The
LoadLibrary call resets the debug allocator. Here is what we do.
#if _DEBUG
// capture the debug allocator.
_CRT_ALLOC_HOOK pfnHook;
pfnHook = _CrtSetAllocHook(NULL);
_CrtSetAllocHook(pfnHook);
#endif
m_hModule = ::LoadLibrary(LibPath.c_str());
#if _DEBUG
// If the load library call changed it, then restore the
value.
_CRT_ALLOC_HOOK pfnHook2;
pfnHook2 = _CrtSetAllocHook(pfnHook);
if (pfnHook2 != pfnHook)
MessageBox( NULL, "LoadLibrary changed the debug
allocator.", "Warning", MB_OK | MB_ICONINFORMATION );
#endif
David Schulze
DeLorme Mapping, Yarmouth, ME, USA
-----Original Message-----
From: bugzilla@apache.org [mailto:bugzilla@apache.org]
Sent: Wednesday, November 06, 2002 3:18 PM
To: xerces-c-dev@xml.apache.org
Subject: DO NOT REPLY [Bug 14311] New: - delete [] of char * from
XMLString::transcode() fails
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=14311>.
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=14311
delete [] of char * from XMLString::transcode() fails
Summary: delete [] of char * from XMLString::transcode() fails
Product: Xerces-C++
Version: 2.1.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: twest@agora.rdrop.com
This is bizzare. char* Win32LCPTranscoder::transcode(const XMLCh* const
toTranscode) is allocating with new [], but trying to delete [] the returned
memory causes the _ASSERTE(_CrtIsValidHeapPointer(pUserData)); in dbgheap.c
to
fail.
Calling into
bool Win32LCPTranscoder::transcode( const char* const toTranscode
, XMLCh* const toFill
, const unsigned int maxChars)
works fine.
About the only thing I can think of is I'm using VC6.0 SP5 with the off the
shelf builds of xerces-c_2(D).lib and xerces-c_2_1_0(D).dll, which are
putatively VC6.0 SP3. Trawled the net and couldn't find any other
descriptions
of this problem.
Email me and I'll send my very simple VC project.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org