Commit 7dd7080a authored by Daniel Veillard's avatar Daniel Veillard

* parser.c threads.c: change the threading initialization sequence

  as suggested by Igor Novoseltsev to avoid crash if xmlInitParser()
  is called from a thread which is not the main one, should fix
  #584605
daniel
parent 4d3e2da7
Thu Jun 4 11:06:07 CEST 2009 Daniel Veillard <daniel@veillard.com>
* parser.c threads.c: change the threading initialization sequence
as suggested by Igor Novoseltsev to avoid crash if xmlInitParser()
is called from a thread which is not the main one, should fix
#584605
Fri May 15 17:54:48 CEST 2009 Daniel Veillard <daniel@veillard.com>
* HTMLparser.c: make sure we keep line numbers fixes #580705
......
......@@ -13847,11 +13847,11 @@ xmlInitParser(void) {
__xmlGlobalInitMutexLock();
if (xmlParserInitialized == 0) {
#endif
xmlInitGlobals();
xmlInitThreads();
if ((xmlGenericError == xmlGenericErrorDefaultFunc) ||
(xmlGenericError == NULL))
initGenericErrorDefaultFunc(NULL);
xmlInitGlobals();
xmlInitThreads();
xmlInitMemory();
xmlInitCharEncodingHandlers();
xmlDefaultSAXHandlerInit();
......
......@@ -852,9 +852,6 @@ xmlUnlockLibrary(void)
void
xmlInitThreads(void)
{
#ifdef DEBUG_THREADS
xmlGenericError(xmlGenericErrorContext, "xmlInitThreads()\n");
#endif
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
InitializeCriticalSection(&cleanup_helpers_cs);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment