mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-27 03:21:26 +03:00
globals: Disable TLS in static Windows builds
The cleanup callback would run after TLS was deallocated.
This commit is contained in:
parent
c7629c9eb1
commit
4c17804050
@ -100,8 +100,14 @@ static xmlMutex xmlThrDefMutex;
|
||||
* On Darwin, thread-local storage destructors seem to be run before
|
||||
* pthread thread-specific data destructors. This causes ASan to
|
||||
* report a use-after-free.
|
||||
*
|
||||
* On Windows, we can't use TLS in static builds. The RegisterWait
|
||||
* callback would run after TLS was deallocated.
|
||||
*/
|
||||
#if defined(XML_THREAD_LOCAL) && !defined(__APPLE__)
|
||||
#if defined(XML_THREAD_LOCAL) && \
|
||||
!defined(__APPLE__) && \
|
||||
(!defined(HAVE_WIN32_THREADS) || \
|
||||
!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL))
|
||||
#define USE_TLS
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user