[lsan] Regression test for 7d328668691a
authorVitaly Buka <vitalybuka@google.com>
Tue, 11 Apr 2023 22:32:22 +0000 (15:32 -0700)
committerVitaly Buka <vitalybuka@google.com>
Tue, 11 Apr 2023 22:35:11 +0000 (15:35 -0700)
compiler-rt/test/lsan/TestCases/lsan_annotations.cpp

index 044f967..ae27e32 100644 (file)
@@ -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;