Race in xmlXPathInit detected by ThreadSanitizer
When xmlXPathEval (and some others) is called in parallel threads, xmlXPathInit may run concurrently resulting in a race to (re)initialize xmlXPathNAN:
WARNING: ThreadSanitizer: data race (pid=661589)
Write of size 8 at 0x00000239a140 by thread T4:
#0 xmlXPathInit libxml/xpath.c:499:17 (ylast+0x1c1e2f2)
#1 xmlXPathEval libxml/xpath.c:14444 (ylast+0x1c1e2f2)
#2 xmlXPathEvalExpression libxml/xpath.c:14524:12 (ylast+0x1c1e690)
…
Previous write of size 8 at 0x00000239a140 by thread T3:
#0 xmlXPathInit libxml/xpath.c:499:17 (ylast+0x1c1e2f2)
#1 xmlXPathEval libxml/xpath.c:14444 (ylast+0x1c1e2f2)
#2 xmlXPathEvalExpression libxml/xpath.c:14524:12 (ylast+0x1c1e690)
…
Location is global 'xmlXPathNAN' of size 8 at 0x00000239a140 (ylast+0x00000239a140)
May the initialization of xmlXPath double constants be moved to the global scope as it was before 7abec671? This seems more important than the support for "some pre-C99 compilers" (which?) in the latest version of libxml. This would fix #138 (closed).