summaryrefslogtreecommitdiff
path: root/mallocx.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-03-31 15:54:54 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-03-31 16:01:11 +0300
commit0eb8d2f95c7a683338b9e3c2b55c84aa5edb4bf7 (patch)
tree67f6d840ea3c8609c42bf7803ebbb427d5dfc3e6 /mallocx.c
parent4b96d5296fc05586971c801c152dcb7b970e9523 (diff)
downloadbdwgc-0eb8d2f95c7a683338b9e3c2b55c84aa5edb4bf7.tar.gz
Workaround SIG_SUSPEND delivery to thread inside mutex_lock fail if TSan
Unfortunately, use of an asynchronous signal to suspend threads leads to the situation when the signal is not delivered (is stored to pending_signals in ThreadSanitizer runtime actually) while the target thread is blocked in pthread_mutex_lock. Thus, we use some synchronous one instead (which is again unlikely to be used by clients directly). * include/private/gc_priv.h [SIGNAL_BASED_STOP_WORLD && !SIG_SUSPEND && THREAD_SANITIZER] (SIG_SUSPEND): Define to SIGSYS; add comment. * tests/disclaim.c [GC_PTHREADS] (main): Call GC_set_thr_restart_signal(GC_get_suspend_signal()) instead of GC_set_suspend_signal(GC_get_thr_restart_signal()) (thus, the signal used to suspend threads is not modified in the test).
Diffstat (limited to 'mallocx.c')
0 files changed, 0 insertions, 0 deletions