[compiler-rt] c3a46fe - [test][lsan] Remove std::vector from test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 14:49:25 PDT 2023


Author: Vitaly Buka
Date: 2023-05-05T14:48:57-07:00
New Revision: c3a46fe9c15176acc169cd2413c525bf92704419

URL: https://github.com/llvm/llvm-project/commit/c3a46fe9c15176acc169cd2413c525bf92704419
DIFF: https://github.com/llvm/llvm-project/commit/c3a46fe9c15176acc169cd2413c525bf92704419.diff

LOG: [test][lsan] Remove std::vector from test

Added: 
    

Modified: 
    compiler-rt/test/lsan/TestCases/create_thread_leak.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp b/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp
index 7deab540df2a..d04f5f64f23b 100644
--- a/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp
+++ b/compiler-rt/test/lsan/TestCases/create_thread_leak.cpp
@@ -11,7 +11,6 @@
 
 #include <pthread.h>
 #include <stdlib.h>
-#include <vector>
 
 #include <sanitizer/lsan_interface.h>
 
@@ -25,7 +24,7 @@ static void *thread_free(void *args) {
 int main(int argc, char **argv) {
   int n = atoi(argv[1]);
   for (int i = 0; i < n; ++i) {
-    std::vector<pthread_t> threads(10);
+    pthread_t threads[10];
 
     for (auto &thread : threads) {
       pthread_create(&thread, 0, thread_free, malloc(123));


        


More information about the llvm-commits mailing list