summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-07-26 23:03:02 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-07-26 23:03:02 +0300
commitb104cdc50404d1f18905cc8f07add407241dfc23 (patch)
tree29c63ad6b7a293169e3db10c300c514b150a025f
parentd4903987085999deb70700d03e1ba6bc76fcbee0 (diff)
downloadbdwgc-b104cdc50404d1f18905cc8f07add407241dfc23.tar.gz
Fix assertion violation in LOCK called before GC_thr_init
(fix of commit d8fd1a291) * misc.c [(GC_PTHREADS || GC_WIN32_THREADS) && LINT2] (GC_init): Do not wrap GC_thr_init() into LOCK/UNLOCK if GC_ASSERTIONS and GC_ALWAYS_MULTITHREADED.
-rw-r--r--misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 9c1ae817..07acc93e 100644
--- a/misc.c
+++ b/misc.c
@@ -1322,7 +1322,8 @@ GC_API void GC_CALL GC_init(void)
# endif
GC_is_initialized = TRUE;
# if defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
-# ifdef LINT2
+# if defined(LINT2) \
+ && !(defined(GC_ASSERTIONS) && defined(GC_ALWAYS_MULTITHREADED))
LOCK();
GC_thr_init();
UNLOCK();