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 6
6
// RUN: not %run %t 1 2>&1 | FileCheck %s
7
7
// RUN: not %run %t 1000 2>&1 | FileCheck %s
8
8
// RUN: not %run %t 1000000 2>&1 | FileCheck %s
9
- // RUN: not %run %t 10000000 2>&1 | FileCheck %s
10
9
11
10
#include < cstdlib>
12
- #include < stdio.h>
13
11
#include < thread>
14
- int *t;
15
12
16
13
__attribute__ ((noopt)) void leak(int n) {
17
14
#if defined(__ANDROID__) || defined(__BIONIC__)
@@ -25,9 +22,8 @@ __attribute__((noopt)) void leak(int n) {
25
22
// Repeat few times to make sure that at least one pointer is
26
23
// not somewhere on the stack.
27
24
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 ;
31
27
}
32
28
}
33
29
You can’t perform that action at this time.
0 commit comments