[xml] IO callbacks are not thread-safe

The input and output callbacks of libxml are stored in static arrays in
xmlIO.c, so any use of the callback functions is not thread-safe.

In many cases this shouldn't be a problem, if callbacks are registered
only at the start of a program. But the Perl bindings register and
unregister callbacks every time a document is parsed. I can reproduce
random segfaults or other errors when processing many thousand documents
in concurrent threads with the libxml Perl bindings.

I'm willing to help fix this, but I'm not sure about the correct
approach. Should the callback arrays be added to the global variables in


aevum gmbh
rumfordstr. 4
80469 münchen

tel: +49 89 3838 0653

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