summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-11-03 21:08:52 +0000
committerKamil Rytarowski <n54@gmx.com>2017-11-03 21:08:52 +0000
commitef40253e3d57a0398fa52dc371c11f383192235f (patch)
tree86445d31fd26fbb9181702cbf0e5073ce8fbe0e4 /lib
parentaad2b2b91309ddb2f05cb2c5e3ea3a24ac3684b9 (diff)
Late fixup in _lwp_exit on TSan/NetBSD
Call DestroyThreadState() before REAL(_lwp_exit)(); This variation is less racy. Sponsored by <The NetBSD Foundation> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/rtl/tsan_interceptors.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tsan/rtl/tsan_interceptors.cc b/lib/tsan/rtl/tsan_interceptors.cc
index db92f7528..0b4e873a0 100644
--- a/lib/tsan/rtl/tsan_interceptors.cc
+++ b/lib/tsan/rtl/tsan_interceptors.cc
@@ -2451,8 +2451,8 @@ TSAN_INTERCEPTOR(void *, __tls_get_addr, void *arg) {
#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