[compiler-rt] r317369 - Late fixup in _lwp_exit on TSan/NetBSD
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 14:08:52 PDT 2017
Author: kamil
Date: Fri Nov 3 14:08:52 2017
New Revision: 317369
URL: http://llvm.org/viewvc/llvm-project?rev=317369&view=rev
Log:
Late fixup in _lwp_exit on TSan/NetBSD
Call DestroyThreadState() before REAL(_lwp_exit)();
This variation is less racy.
Sponsored by <The NetBSD Foundation>
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=317369&r1=317368&r2=317369&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Fri Nov 3 14:08:52 2017
@@ -2451,8 +2451,8 @@ TSAN_INTERCEPTOR(void *, __tls_get_addr,
#if SANITIZER_NETBSD
TSAN_INTERCEPTOR(void, _lwp_exit) {
SCOPED_TSAN_INTERCEPTOR(_lwp_exit);
- REAL(_lwp_exit)();
DestroyThreadState();
+ REAL(_lwp_exit)();
}
#define TSAN_MAYBE_INTERCEPT__LWP_EXIT TSAN_INTERCEPT(_lwp_exit)
#else
More information about the llvm-commits
mailing list