[xml] 2.6.26 xpath returns too many nodes?

We recently upgraded from libxml2 version 2.6.13 to 2.6.26, and are now running into problems with the xpath code. It appears that, very infrequently, the result of xmlXPathEvalExpression contains too many nodes (the correct node and a handful of nodes that appear a bit later in the document, but not necessary only the immediate siblings or chilrden).

The problem is hard to reproduce, and would appear to be some sort of race condition. So far I can't come up with a testcase that consistently reproduces it. The 2.6.24 libxml2 however, works fine.

This is a win32 build, using C++ Builder 5, and I'm checking xmlHasFeature(XML_WITH_THREAD) at startup to make sure I've really got a threaded version of libxml2. The code is running inside a multithreaded webserver using a thread pool, but in this specific case, the xmlDoc and xpath expressions aren't accessed by different threads (the code fails during the 'startup' phase of a http request handling, and the objects are not passed between threads in that phase yet)

Any suggestions on where to look for the problem?

Thanks in advance,
Arnold Hendriks

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