Re: [xml] correct version of libxml2



  Hi Thomas,

 thanks for getting back to me on this issue, and in the proper forum !

On Mon, Apr 25, 2011 at 01:30:30PM +0000, Floodeenjr, Thomas wrote:
Daniel,

I believe you are correct. I found out that our code works with libxml2-2.7.2, but started to crash in 
2.7.3. I traced it down to a small change in threads.c:921 in 2.7.3:

#elif defined HAVE_PTHREAD_H
    if ((libxml_is_threaded)  && (pthread_key_delete != NULL))
        pthread_key_delete(globalkey);
#endif

If I comment out the pthread_key_delete() call, our crash goes away. For expediency, I am doing this now. 
However, we would like to track down why we are crashing.

  How did you end up calling xmlCleanupThreads() where that code is done.
It sounds very likely that you are calling xmlCleanupParser() while
still using the library, and well in that case the crash is normal !
  http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser

see the documentation, you should call this function only once libxml2
is not in use anywhere in the application, which those days is very had
to assert. Simplest is to just not call it.

Daniel

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Sunday, April 24, 2011 8:17 PM
To: Floodeenjr, Thomas
Cc: Aleksey Sanin; xmlsec aleksey com
Subject: Re: [xmlsec] correct version of libxml2

On Wed, Apr 20, 2011 at 04:40:37PM +0000, Floodeenjr, Thomas wrote:
Aleksey,

We are having problems with libxml2 that are not related to xmlsec.
Our xmlsec tests are working fine so far, but some of our core libxml2 
usage is broken.

  That's the wrong place to report such problems.
2.6.x releases are rather old and 2.6.12 is very old. I fixed a number of things in libxml2 since then. If 
you got troubles, it may be due to a misuse of the library, compilation problems, or possibly a bug but 
it's impossible to tell from your report, and this list ain't the right place for it:
  http://xmlsoft.org/bugs.html

  In my experience as libxml2 maintainer most of the time when people report "bugs" appareing in recent 
libxml2 versions it is that they relied upon broken behaviour usually not conformant to the specification. 
Hiding the problem around by keeping an obsolete version of the library rather than investigating the 
problem exposes the user to risk including security ones. If you are embbeding libxml2 for any shipping 
product I urge you to actually report the problem and get it solved instead of hiding this under the carpet 
by using an obsolete
libxml2 version,

  thanks in advance,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization 
library  http://libvirt.org/

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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