summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2018-03-16 08:23:33 +0000
committerVitaly Buka <vitalybuka@google.com>2018-03-16 08:23:33 +0000
commit1d0c7ff1c48605381936993c8f02cb58e56a03b7 (patch)
tree28e6fa842f91b5479bac0bdde3da704c8fbee1f7 /compiler-rt/lib
parent21f1b69862c376b519258e12a1f85e7b183480f6 (diff)
downloadbcm5719-llvm-1d0c7ff1c48605381936993c8f02cb58e56a03b7.tar.gz
bcm5719-llvm-1d0c7ff1c48605381936993c8f02cb58e56a03b7.zip
FreeBSD TSan support update
Summary: - Disable thread_finalize callback on FreeBSD, fixing couple of unit tests. Patch by David CARLIER Reviewers: vitalybuka Reviewed By: vitalybuka Subscribers: emaste, kubamracek, krytarowski, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44156 llvm-svn: 327697
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_interceptors.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
index e032062346d..a18ac0f772e 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
@@ -905,7 +905,7 @@ void DestroyThreadState() {
}
} // namespace __tsan
-#if !SANITIZER_MAC && !SANITIZER_NETBSD
+#if !SANITIZER_MAC && !SANITIZER_NETBSD && !SANITIZER_FREEBSD
static void thread_finalize(void *v) {
uptr iter = (uptr)v;
if (iter > 1) {
@@ -936,7 +936,7 @@ extern "C" void *__tsan_thread_start_func(void *arg) {
ThreadState *thr = cur_thread();
// Thread-local state is not initialized yet.
ScopedIgnoreInterceptors ignore;
-#if !SANITIZER_MAC && !SANITIZER_NETBSD
+#if !SANITIZER_MAC && !SANITIZER_NETBSD && !SANITIZER_FREEBSD
ThreadIgnoreBegin(thr, 0);
if (pthread_setspecific(interceptor_ctx()->finalize_key,
(void *)GetPthreadDestructorIterations())) {
@@ -2742,7 +2742,7 @@ void InitializeInterceptors() {
Die();
}
-#if !SANITIZER_MAC && !SANITIZER_NETBSD
+#if !SANITIZER_MAC && !SANITIZER_NETBSD && !SANITIZER_FREEBSD
if (pthread_key_create(&interceptor_ctx()->finalize_key, &thread_finalize)) {
Printf("ThreadSanitizer: failed to create thread key\n");
Die();
OpenPOWER on IntegriCloud