File tree Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ void __msan_init() {
470
470
471
471
MsanThread *main_thread = MsanThread::Create (nullptr , nullptr );
472
472
SetCurrentThread (main_thread);
473
- main_thread->ThreadStart ();
473
+ main_thread->Init ();
474
474
475
475
#if MSAN_CONTAINS_UBSAN
476
476
__ubsan::InitAsPlugin ();
Original file line number Diff line number Diff line change @@ -1033,6 +1033,7 @@ extern "C" int pthread_attr_destroy(void *attr);
1033
1033
static void *MsanThreadStartFunc (void *arg) {
1034
1034
MsanThread *t = (MsanThread *)arg;
1035
1035
SetCurrentThread (t);
1036
+ t->Init ();
1036
1037
return t->ThreadStart ();
1037
1038
}
1038
1039
Original file line number Diff line number Diff line change @@ -65,20 +65,7 @@ void MsanThread::Destroy() {
65
65
DTLS_Destroy ();
66
66
}
67
67
68
- thread_return_t MsanThread::ThreadStart () {
69
- Init ();
70
-
71
- if (!start_routine_) {
72
- // start_routine_ == 0 if we're on the main thread or on one of the
73
- // OS X libdispatch worker threads. But nobody is supposed to call
74
- // ThreadStart() for the worker threads.
75
- return 0 ;
76
- }
77
-
78
- thread_return_t res = start_routine_ (arg_);
79
-
80
- return res;
81
- }
68
+ thread_return_t MsanThread::ThreadStart () { return start_routine_ (arg_); }
82
69
83
70
MsanThread::StackBounds MsanThread::GetStackBounds () const {
84
71
if (!stack_switching_)
You can’t perform that action at this time.
0 commit comments