[all-commits] [llvm/llvm-project] be41a9: tsan: fix deadlock with pthread_atfork callbacks
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Sat Mar 21 06:37:01 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: be41a98ac222f33ed5558d86e1cede67249e99b5
https://github.com/llvm/llvm-project/commit/be41a98ac222f33ed5558d86e1cede67249e99b5
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2020-03-21 (Sat, 21 Mar 2020)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
A compiler-rt/test/tsan/pthread_atfork_deadlock2.c
Log Message:
-----------
tsan: fix deadlock with pthread_atfork callbacks
This fixes the bug reported at:
https://groups.google.com/forum/#!topic/thread-sanitizer/e_zB9gYqFHM
A pthread_atfork callback triggers a data race
and we deadlock on the report_mtx. Ignore memory access
in the pthread_atfork callbacks to prevent the deadlock.
More information about the All-commits
mailing list