[compiler-rt] 0a1bcab - tsan: fix deadlock in libbacktrace
Martin Liska via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 03:51:58 PDT 2022
Author: Martin Liska
Date: 2022-05-03T12:51:20+02:00
New Revision: 0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46
URL: https://github.com/llvm/llvm-project/commit/0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46
DIFF: https://github.com/llvm/llvm-project/commit/0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46.diff
LOG: tsan: fix deadlock in libbacktrace
Fixes deadlock seen in GCC.
Fixes: #55226
Differential Revision: https://reviews.llvm.org/D124838
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
index 8e40ea76fe32c..60ca9633868ea 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
@@ -1767,7 +1767,8 @@ TSAN_INTERCEPTOR(int, listen, int fd, int backlog) {
TSAN_INTERCEPTOR(int, close, int fd) {
SCOPED_INTERCEPTOR_RAW(close, fd);
- FdClose(thr, pc, fd);
+ if (!in_symbolizer())
+ FdClose(thr, pc, fd);
return REAL(close)(fd);
}
More information about the llvm-commits
mailing list