File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
compiler-rt/test/asan/TestCases Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 66// RUN: not %run %t 1 2>&1 | FileCheck %s
77// RUN: not %run %t 1000 2>&1 | FileCheck %s
88// RUN: not %run %t 1000000 2>&1 | FileCheck %s
9- // RUN: not %run %t 10000000 2>&1 | FileCheck %s
109
1110#include < cstdlib>
12- #include < stdio.h>
1311#include < thread>
14- int *t;
1512
1613__attribute__ ((noopt)) void leak(int n) {
1714#if defined(__ANDROID__) || defined(__BIONIC__)
@@ -25,9 +22,8 @@ __attribute__((noopt)) void leak(int n) {
2522 // Repeat few times to make sure that at least one pointer is
2623 // not somewhere on the stack.
2724 for (int i = 0 ; i < 10 ; ++i) {
28- t = new int [n];
29- printf (" t: %p\n " , t);
30- t = 0 ;
25+ volatile int *t = new int [n];
26+ t = nullptr ;
3127 }
3228}
3329
You can’t perform that action at this time.
0 commit comments