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=25817>.
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=25817

atomicOpsMutex causes static initialization problems

           Summary: atomicOpsMutex causes static initialization problems
           Product: Xerces-C++
           Version: 2.4.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In my application, I use alternate implementations of ::new and its ilk. Up to
version 2.3 this provided to be a non-issue because Xerces didn't allocate any
memory until after XMLPLatformUtils::Initialize was called. Starting with
version 2.4, the constructor of XMLMutex seems to allocate memory and this class
is used by LinuxPlatformUtils in a static instance (atomicOpsMutex). This means
that users of Xerces can no longer determine when Xerces will allocate its first
memory (since the order of static initialization is "unspecified"). 

Consequently, I find it necessary to modify the code in
util/Platforms/Linux/LinuxPlatformUtils.cpp to change atomicOpsMutex to be a
pointer that is allocated in LinuxPlatformUtils::platformInit.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to