[NFC][lsan] Rename test function
authorVitaly Buka <vitalybuka@google.com>
Tue, 18 Apr 2023 19:43:13 +0000 (12:43 -0700)
committerVitaly Buka <vitalybuka@google.com>
Tue, 18 Apr 2023 19:47:23 +0000 (12:47 -0700)
compiler-rt/test/lsan/TestCases/thread_context_crash.cpp

index 26acc00..815967c 100644 (file)
@@ -1,4 +1,4 @@
-// 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
@@ -17,7 +17,7 @@ namespace __lsan {
 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;
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
   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);