[all-commits] [llvm/llvm-project] 20ee72: tsan: don't call dlsym during exit
Dmitry Vyukov via All-commits
all-commits at lists.llvm.org
Tue Sep 21 22:12:13 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 20ee72d4ccb17c6f32641c690fa129475427ae45
https://github.com/llvm/llvm-project/commit/20ee72d4ccb17c6f32641c690fa129475427ae45
Author: Dmitry Vyukov <dvyukov at google.com>
Date: 2021-09-22 (Wed, 22 Sep 2021)
Changed paths:
M compiler-rt/lib/tsan/rtl/tsan_interface.h
M compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
M compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
M compiler-rt/lib/tsan/rtl/tsan_rtl.h
A compiler-rt/test/tsan/signal_exit.cpp
Log Message:
-----------
tsan: don't call dlsym during exit
dlsym calls into dynamic linker which calls malloc and other things.
It's problematic to do it during the actual exit, because
it can happen from a singal handler or from within the runtime
after we reported the first bug, etc.
See https://github.com/google/sanitizers/issues/1440 for an example
(captured in the added test).
Initialize the callbacks during startup instead.
Depends on D110159.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D110166
More information about the All-commits
mailing list