We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cad45d commit a5b06adCopy full SHA for a5b06ad
compiler-rt/lib/msan/msan_thread.cpp
@@ -65,7 +65,18 @@ void MsanThread::Destroy() {
65
DTLS_Destroy();
66
}
67
68
-thread_return_t MsanThread::ThreadStart() { return start_routine_(arg_); }
+thread_return_t MsanThread::ThreadStart() {
69
+ if (!start_routine_) {
70
+ // start_routine_ == 0 if we're on the main thread or on one of the
71
+ // OS X libdispatch worker threads. But nobody is supposed to call
72
+ // ThreadStart() for the worker threads.
73
+ return 0;
74
+ }
75
+
76
+ thread_return_t res = start_routine_(arg_);
77
78
+ return res;
79
+}
80
81
MsanThread::StackBounds MsanThread::GetStackBounds() const {
82
if (!stack_switching_)
0 commit comments