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 bu...@apache.org on 2002/11/21 02:51:52 UTC
DO NOT REPLY [Bug 14723] New: -
Memory leak in atomicOpsMutex
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=14723>.
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=14723
Memory leak in atomicOpsMutex
Summary: Memory leak in atomicOpsMutex
Product: Xerces-C++
Version: 2.1.0
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: Utilities
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: zell@best.com
For several platforms, there exists an XMLMutex named atomicOpsMutex. This
object is a global with static scope, and should have its constructor executed
on startup. After its constructor has finished, atomicOpsMutex.fHandle should
point to a valid mutex.
XMLPlatformUtils::platformInit() will re-assign atomicOpsMutex.fHandle without
checking if the pointer is non-0, thereby leaking the initial mutex. This
occurs on Linux, FreeBSD, HP-UX, and IRIX.
I made a simple conditional in each offending source file:
if (atomicOpsMutex.fHandle == 0)
{
atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org