1 // Test that MallocStackLogging=1 doesn't crash. MallocStackLogging turns on
2 // callbacks from mmap/munmap libc function into libmalloc. Darwin-specific
3 // ThreadState initialization needs to avoid calling the library functions (and
4 // use syscalls directly) to make sure other interceptors aren't called.
6 // RUN: %clangxx_tsan -O1 %s -o %t
7 // RUN: MallocStackLogging=1 %run %t 2>&1 | FileCheck %s
18 pthread_create(&t
, NULL
, foo
, NULL
);
19 pthread_join(t
, NULL
);
20 fprintf(stderr
, "Done.\n");