[sanitizer] Fail instead of crash without real_pthread_create

This commit is contained in:
Vitaly Buka 2021-11-23 20:05:25 -08:00
parent 02710413a3
commit 55792b5ac4
1 changed files with 2 additions and 0 deletions

View File

@ -1760,6 +1760,8 @@ HandleSignalMode GetHandleSignalMode(int signum) {
#if !SANITIZER_GO
void *internal_start_thread(void *(*func)(void *arg), void *arg) {
if (&real_pthread_create == 0)
return nullptr;
// Start the thread with signals blocked, otherwise it can steal user signals.
ScopedBlockSignals block(nullptr);
void *th;