After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687084 - [patch] --with-thread-alloc doesn't define LIBXML_THREAD_ALLOC_ENABLED in xmlversion.h
[patch] --with-thread-alloc doesn't define LIBXML_THREAD_ALLOC_ENABLED in xml...
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-29 03:06 UTC by Tim Starling
Modified: 2012-10-29 06:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for git-am (1.78 KB, patch)
2012-10-29 03:06 UTC, Tim Starling
none Details | Review

Description Tim Starling 2012-10-29 03:06:20 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.
Comment 1 Tim Starling 2012-10-29 03:42:36 UTC
The application: https://github.com/php/php-src/pull/223
Comment 2 Daniel Veillard 2012-10-29 06:26:46 UTC
Okay, that looks reasonable, applied and pushed upstream:

  http://git.gnome.org/browse/libxml2/commit/?id=0ad948ede2b5060a144c72e4e27c38d24a272ef4

thanks !

Daniel