GNOME Bugzilla – Bug 687084
[patch] --with-thread-alloc doesn't define LIBXML_THREAD_ALLOC_ENABLED in xmlversion.h
Last modified: 2012-10-29 06:26:46 UTC
Created attachment 227495 [details] [review] Patch for git-am ./configure --with-thread-alloc just adds "-DLIBXML_THREAD_ALLOC_ENABLED" to CFLAGS, it doesn't add LIBXML_THREAD_ALLOC_ENABLED to xmlversion.h. So applications have no way to tell whether this functionality is enabled, and application-level calls to xmlFree() etc. will use the true global variables, not the thread-local variables. Discovered while testing a patch for PHP which uses xmlMemSetup(). This change to libxml2 is necessary to make it possible for PHP to use xmlMemSetup() with a libxml2 library configured with --with-thread-alloc. Patch attached.
The application: https://github.com/php/php-src/pull/223
Okay, that looks reasonable, applied and pushed upstream: http://git.gnome.org/browse/libxml2/commit/?id=0ad948ede2b5060a144c72e4e27c38d24a272ef4 thanks ! Daniel