summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_mac.cc
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-02-02 12:54:21 +0000
committerKuba Mracek <mracek@apple.com>2017-02-02 12:54:21 +0000
commitbba1d405894ff41e283645386704e4eb04d3cf7c (patch)
tree7cd07422523d42505ba647a766d7eb8645710010 /compiler-rt/lib/asan/asan_mac.cc
parente396d8e2602e0b269d9c8145d0738a46ff89eb6d (diff)
downloadbcm5719-llvm-bba1d405894ff41e283645386704e4eb04d3cf7c.tar.gz
bcm5719-llvm-bba1d405894ff41e283645386704e4eb04d3cf7c.zip
[tsan] Properly describe GCD worker threads in reports
When dealing with GCD worker threads, TSan currently prints weird things like "created by thread T-1" and "[failed to restore the stack]" in reports. This patch avoids that and instead prints "Thread T3 (...) is a GCD worker thread". Differential Revision: https://reviews.llvm.org/D29103 llvm-svn: 293882
Diffstat (limited to 'compiler-rt/lib/asan/asan_mac.cc')
-rw-r--r--compiler-rt/lib/asan/asan_mac.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc
index baf533ac96a..38189a90714 100644
--- a/compiler-rt/lib/asan/asan_mac.cc
+++ b/compiler-rt/lib/asan/asan_mac.cc
@@ -138,7 +138,8 @@ void asan_register_worker_thread(int parent_tid, StackTrace *stack) {
t = AsanThread::Create(/* start_routine */ nullptr, /* arg */ nullptr,
parent_tid, stack, /* detached */ true);
t->Init();
- asanThreadRegistry().StartThread(t->tid(), 0, 0);
+ asanThreadRegistry().StartThread(t->tid(), GetTid(),
+ /* workerthread */ true, 0);
SetCurrentThread(t);
}
}
OpenPOWER on IntegriCloud