Re: [xml] libxml2 and pthreads

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

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 particularly
mind if such changes occur between major releases, and was in fact using this
as an argument for adding external locking API.

 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 :)

Ben Greear <greearb candelatech com>
Candela Technologies Inc

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