[compiler-rt] 89fb2c7 - [asan] More leaks in test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 17:59:24 PST 2021


Author: Vitaly Buka
Date: 2021-11-12T17:59:14-08:00
New Revision: 89fb2c71a2cd2818bb2d9aa7fcaf882a4d2b5128

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

LOG: [asan] More leaks in test

It fails to detect a single leak with GLIBC 2.34.

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp b/compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp
index d95d95fc5d5f..294de13ce197 100644
--- a/compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp
+++ b/compiler-rt/test/asan/TestCases/coverage-and-lsan.cpp
@@ -11,9 +11,10 @@
 // REQUIRES: leak-detection
 // FIXME: sancov paths not work with adb
 // UNSUPPORTED: android
-int *g = new int;
+int *g;
 int main(int argc, char **argv) {
-  g = 0;
+  for (int i = 0; i < 10; ++i)
+    g = new int[i];
   return 0;
 }
 


        


More information about the llvm-commits mailing list