Commit e6f05099e8de3c89201aa92c5d6f0286b9299522

Mike Hommey 2010-10-15T19:50:03

Fix a potential segfault due to weak symbols on pthreads In xmlInitParser, both __xmlGlobalInitMutexLock and xmlInitGlobals are called before xmlInitThreads, and both use pthread symbols. __xmlGlobalInitMutexLock does so directly, without checking if the symbol exists, and xmlInitGlobals calls xmlNewMutex, which correctly depends on libxml_is_threaded... except libxml_is_threaded is still -1 by then... And again, when releasing the global mutex in __xmlGlobalInitMutexUnlock, the pthread function is called directly. The patch changes the initialization order and make sure the functions are available before calling them