[PATCH] D47677: [TSan] FreeBSD / intercept thr_exit
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 3 23:06:48 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL333870 (authored by devnexen, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D47677?vs=149617&id=149674#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47677
Files:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Index: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
===================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
@@ -2538,6 +2538,17 @@
#define TSAN_MAYBE_INTERCEPT__LWP_EXIT
#endif
+#if SANITIZER_FREEBSD
+TSAN_INTERCEPTOR(void, thr_exit, tid_t *state) {
+ SCOPED_TSAN_INTERCEPTOR(thr_exit, state);
+ DestroyThreadState();
+ REAL(thr_exit(state));
+}
+#define TSAN_MAYBE_INTERCEPT_THR_EXIT TSAN_INTERCEPT(thr_exit)
+#else
+#define TSAN_MAYBE_INTERCEPT_THR_EXIT
+#endif
+
TSAN_INTERCEPTOR_NETBSD_ALIAS(int, cond_init, void *c, void *a);
TSAN_INTERCEPTOR_NETBSD_ALIAS(int, cond_signal, void *c);
TSAN_INTERCEPTOR_NETBSD_ALIAS(int, cond_broadcast, void *c);
@@ -2730,6 +2741,7 @@
#endif
TSAN_MAYBE_INTERCEPT__LWP_EXIT;
+ TSAN_MAYBE_INTERCEPT_THR_EXIT;
#if !SANITIZER_MAC && !SANITIZER_ANDROID
// Need to setup it, because interceptors check that the function is resolved.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47677.149674.patch
Type: text/x-patch
Size: 1018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180604/a0b575bb/attachment.bin>
More information about the llvm-commits
mailing list