-// Check that concurent CurrentThreadContext does not crash.
+// Check that concurent GetCurrentThread does not crash.
// RUN: %clangxx_lsan -O3 -pthread %s -o %t && %run %t 100
// REQUIRES: lsan-standalone
class ThreadContextLsanBase *GetCurrentThread();
}
-void *null_func(void *args) {
+void *try_to_crash(void *args) {
for (int i = 0; i < 100000; ++i)
__lsan::GetCurrentThread();
return nullptr;
for (int i = 0; i < atoi(argv[1]); ++i) {
threads.resize(10);
for (auto &thread : threads)
- pthread_create(&thread, 0, null_func, NULL);
+ pthread_create(&thread, 0, try_to_crash, NULL);
for (auto &thread : threads)
pthread_join(thread, nullptr);