diff --git a/compiler-rt/lib/asan/asan_interceptors.cpp b/compiler-rt/lib/asan/asan_interceptors.cpp --- a/compiler-rt/lib/asan/asan_interceptors.cpp +++ b/compiler-rt/lib/asan/asan_interceptors.cpp @@ -223,6 +223,11 @@ auto self = GetThreadSelf(); auto args = asanThreadArgRetval().GetArgs(self); t->ThreadStart(GetTid()); + + __sanitizer_sigset_t sigset; + t->GetStartData(sigset); + SetSigProcMask(&sigset, nullptr); + thread_return_t retval = (*args.routine)(args.arg_retval); asanThreadArgRetval().Finish(self, retval); return retval; @@ -242,7 +247,11 @@ }(); u32 current_tid = GetCurrentTidOrInvalid(); - AsanThread *t = AsanThread::Create(current_tid, &stack, detached); + + __sanitizer_sigset_t sigset; + ScopedBlockSignals block(&sigset); + + AsanThread *t = AsanThread::Create(sigset, current_tid, &stack, detached); int result; {