Re: [xml] libxml2 and pthreads



On Fri, Aug 20, 2004 at 11:28:14AM -0700, Ben Greear wrote:
Daniel Veillard wrote:

No. The dependancy is embedded in the shared library. The applications
don't need to be recompiled to go from RH9 to FC2, so the ABI *was*
preserved. The API was preserved too because no application needed to
change their code either assuming they do what they are supposed to do 
which is to call xmlInitParser() after checking the version (c.f. the
examples)

Ok, so maybe I don't understand the subtlties of API v/s ABI etc.  However,
my programs won't even compile unless I add -lpthreads.  I don't 

  http://xmlsoft.org/FAQ.html#Developer item #1 use xml2-config in your
Makefiles .

particularly
mind if such changes occur between major releases, and was in fact using 
this
as an argument for adding external locking API.

  Adding APIs is possible if they make sense. Breaking existing APIs
or the ABIs is not possible.

Your application crashes because you're calling fork() in a signal
handler. The fact that it broke is not related to libxml2, but the 
interraction of the pthread memory allocator (my guess) and doing that
very silly thing.

Yes, it is a deadlock in the pthread at_fork handler code.  It may or may 
not
be a bug in my use of fork().  Regardless, I am never happy seeing a pthread
backtrace when debugging my otherwise single threaded app :)

  Ulrich Drepper looked at your mail in the archive as stated there isn't
enough information to be worth looking at. Provide a complete glibc bug
report at http://gnuweb.binarycompass.org/software/libc/bugs.html but not
here it is not libxml2 related.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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