forked from OSchip/llvm-project
parent
fe83270ee9
commit
f1f556c179
|
@ -44,7 +44,7 @@ void Thread::InsertIntoThreadList(Thread *t) {
|
|||
}
|
||||
|
||||
void Thread::RemoveFromThreadList(Thread *t) {
|
||||
CHECK_NE(t, main_thread);
|
||||
if (t == main_thread) return; // Do nothing (happens due to pthread_exit).
|
||||
SpinMutexLock l(&thread_list_mutex);
|
||||
thread_stats.n_live_threads--;
|
||||
thread_stats.total_stack_size -= t->stack_size();
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// Tests pthread_exit.
|
||||
// RUN: %clang_hwasan %s -o %t && %run %t
|
||||
// REQUIRES: stable-runtime
|
||||
#include <pthread.h>
|
||||
int main() { pthread_exit(NULL); }
|
Loading…
Reference in New Issue