1 // RUN: %clangxx_tsan -O1 %s -o %t
2 // RUN: %deflake %env_tsan_opts=force_background_thread=0:verbosity=1:memory_limit_mb=1000 %run %t 2>&1 | FileCheck %s --implicit-check-not "memory flush check"
3 // RUN: %deflake %env_tsan_opts=force_background_thread=1:verbosity=1:memory_limit_mb=1000 %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK,THREAD
4 // RUN: %deflake %env_tsan_opts=force_background_thread=0:verbosity=1:memory_limit_mb=1000 %run %t 1 2>&1 | FileCheck %s --check-prefixes=CHECK,THREAD
6 // Fails with: objc[99984]: task_restartable_ranges_register failed (result 0x2e: (os/kern) service not supported)
11 void *Thread(void *a
) { return nullptr; }
13 int main(int argc
, char *argv
[]) {
16 pthread_create(&t
, nullptr, Thread
, nullptr);
24 // CHECK: Running under ThreadSanitizer
25 // THREAD: ThreadSanitizer: memory flush check