[email protected]
[Top] [All Lists]

Re: MemBufInputSource Core Dump

Subject: Re: MemBufInputSource Core Dump
From: Boris Kolpackov
Date: Thu, 11 Dec 2008 07:41:21 +0200
Hi Nicholas,

[email protected] <[email protected]> writes:

> So initializing and terminating the xerces-c library could result in 
> a failure?

If you do it from multiple threads and don't have proper synchronization.
See this FAQ item for details:


> Also, does each module need to call initialize/terminate on the 
> xerces-c library?  We dynamically load DLLs that use Xerces 
> internally, so any guidance would be helpful.

If your executable is Xerces-aware then the easiest approach 
would be to call Initialize/Terminate from main() and let the
DLLs assume it is initialized.

If this is not the case (e.g., the executable may not know anything
about Xerces-C++), then you will need to call Initialize/Terminate
from each DLL (the support for multiple calls to these functions was
added for this scenario). If DLLs are loaded from the same thread then
you don't need to do anything special. If, however, the libraries may
be loaded from multiple threads concurrently, then you will need to
implement your own synchronization (e.g., a mutex) around calls to


Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>