Re: [xml] Debugging memory in libxml2

On Thu, Dec 21, 2006 at 04:04:39PM -0500, jwert ilstechnology com wrote:
Daniel and Chris -

Thanks for the guidance, I've done the investigation, and here is what 
I've found so far...

1. The first calls to the libxml2 library occur in a thread (not in main).
2.  When a second thread makes a call to xmlBufferCreate() it calls 
xmlGetGlobalState(), which traps on 
EnterCriticalSection(&cleanup_helpers_cs); (line 569 in 2.6.26).
3. Compiler is MSVC  13.10.3077 (32 bit)
4. Libxml2 version is 2.6.26
5. Libxml2 was built with configure.js debug=yes

I've checked and made sure that every component is built with /MD so there 
aren't any CRT problems.  Is there something I have to do in main before I 
can access libxml2 in multiple threads?  Are there problems with 
xmlBuffer's being accessed from multiple threads?  Any other hints?

  Hum, try to call xmlInitParser() in the main thread before any other
operation occurs with libxml2, for example at startup:


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]