|
7 | 7 | // Limit this test to Linux since we're relying on allocator internal |
8 | 8 | // limits (shadow memory size, allocation limits etc.) |
9 | 9 |
|
| 10 | +// TODO(boomanaiden154): Switch back to using env options instead of explicitly |
| 11 | +// exporting when the underlying bug causing ulimits to not apply to run lines |
| 12 | +// that use env options is fixed. |
| 13 | + |
10 | 14 | // RUN: %clangxx_asan -O0 %s -o %t |
11 | 15 | // RUN: ulimit -v 22024290304 |
12 | 16 | // RUN: not %run %t malloc 2>&1 \ |
13 | 17 | // RUN: | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-CRASH |
14 | | -// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t malloc 2>&1 \ |
| 18 | +// RUN: %export_asan_opts=allocator_may_return_null=0 |
| 19 | +// RUN: not %run %t malloc 2>&1 \ |
15 | 20 | // RUN: | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-CRASH |
16 | | -// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t malloc 2>&1 \ |
| 21 | +// RUN: %export_asan_opts=allocator_may_return_null=1 |
| 22 | +// RUN: %run %t malloc 2>&1 \ |
17 | 23 | // RUN: | FileCheck %s --check-prefixes=CHECK-MALLOC,CHECK-NULL |
18 | | -// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t calloc 2>&1 \ |
| 24 | +// RUN: %export_asan_opts=allocator_may_return_null=0 |
| 25 | +// RUN: not %run %t calloc 2>&1 \ |
19 | 26 | // RUN: | FileCheck %s --check-prefixes=CHECK-CALLOC,CHECK-CRASH |
20 | | -// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t calloc 2>&1 \ |
| 27 | +// RUN: %export_asan_opts=allocator_may_return_null=1 |
| 28 | +// RUN: %run %t calloc 2>&1 \ |
21 | 29 | // RUN: | FileCheck %s --check-prefixes=CHECK-CALLOC,CHECK-NULL |
22 | | -// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t realloc 2>&1 \ |
| 30 | +// RUN: %export_asan_opts=allocator_may_return_null=0 |
| 31 | +// RUN: not %run %t realloc 2>&1 \ |
23 | 32 | // RUN: | FileCheck %s --check-prefixes=CHECK-REALLOC,CHECK-CRASH |
24 | | -// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t realloc 2>&1 \ |
| 33 | +// RUN: %export_asan_opts=allocator_may_return_null=1 |
| 34 | +// RUN: %run %t realloc 2>&1 \ |
25 | 35 | // RUN: | FileCheck %s --check-prefixes=CHECK-REALLOC,CHECK-NULL |
26 | | -// RUN: %env_asan_opts=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 \ |
| 36 | +// RUN: %export_asan_opts=allocator_may_return_null=0 |
| 37 | +// RUN: not %run %t realloc-after-malloc 2>&1 \ |
27 | 38 | // RUN: | FileCheck %s --check-prefixes=CHECK-MALLOC-REALLOC,CHECK-CRASH |
28 | | -// RUN: %env_asan_opts=allocator_may_return_null=1 %run %t realloc-after-malloc 2>&1 \ |
| 39 | +// RUN: %export_asan_opts=allocator_may_return_null=1 |
| 40 | +// RUN: %run %t realloc-after-malloc 2>&1 \ |
29 | 41 | // RUN: | FileCheck %s --check-prefixes=CHECK-MALLOC-REALLOC,CHECK-NULL |
30 | 42 |
|
31 | 43 | // ASan shadow memory on s390 is too large for this test. |
|
0 commit comments