[test][lsan] Remove std::vector from test
authorVitaly Buka <vitalybuka@google.com>
Fri, 5 May 2023 21:48:57 +0000 (14:48 -0700)
committerVitaly Buka <vitalybuka@google.com>
Fri, 5 May 2023 21:48:57 +0000 (14:48 -0700)
compiler-rt/test/lsan/TestCases/create_thread_leak.cpp

index 7deab54..d04f5f6 100644 (file)
@@ -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));