[compiler-rt] 7849967 - [lsan] Regression test for 7d328668691a

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 15:35:24 PDT 2023


Author: Vitaly Buka
Date: 2023-04-11T15:35:11-07:00
New Revision: 7849967eccebe7b5bb1cbad338dc83e7520e37b2

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

LOG: [lsan] Regression test for 7d328668691a

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp b/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
index 044f9673c0d21..ae27e3202e0fa 100644
--- a/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
+++ b/compiler-rt/test/lsan/TestCases/lsan_annotations.cpp
@@ -5,12 +5,15 @@
 #include <sanitizer/lsan_interface.h>
 #include <stdlib.h>
 
-int *x, *y;
+int *x, *y, *z;
 
 int main() {
   x = new int;
   __lsan_ignore_object(x);
 
+  z = new int[1000000];  // Large enough for the secondary allocator.
+  __lsan_ignore_object(z);
+
   {
     __lsan::ScopedDisabler disabler;
     y = new int;


        


More information about the llvm-commits mailing list