|
1 | 1 | // Check that ASan plays well with easy cases of makecontext/swapcontext.
|
2 | 2 |
|
3 |
| -// RUN: %clangxx_asan -O0 %s -o %t && %run %t 2>&1 | FileCheck %s |
4 |
| -// RUN: %clangxx_asan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s |
5 |
| -// RUN: %clangxx_asan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s |
6 |
| -// RUN: %clangxx_asan -O3 %s -o %t && %run %t 2>&1 | FileCheck %s |
| 3 | +// RUN: %clangxx_asan -O0 %s -o %t && %run %t |
| 4 | +// RUN: %clangxx_asan -O3 %s -o %t && %run %t |
| 5 | +// RUN: %clangxx_asan -fsanitize-address-use-after-return=never -O0 %s -o %t && %run %t |
| 6 | +// RUN: %clangxx_asan -fsanitize-address-use-after-return=never -O3 %s -o %t && %run %t |
7 | 7 | //
|
8 | 8 | // This test is too sublte to try on non-x86 arch for now.
|
9 | 9 | // Android and musl do not support swapcontext.
|
@@ -76,22 +76,12 @@ int Run(int arg, int mode, char *child_stack) {
|
76 | 76 |
|
77 | 77 | int main(int argc, char **argv) {
|
78 | 78 | char stack[kStackSize + 1];
|
79 |
| - // CHECK: WARNING: ASan doesn't fully support makecontext/swapcontext |
80 | 79 | int ret = 0;
|
81 | 80 | ret += Run(argc - 1, 0, stack);
|
82 |
| - printf("Test1 passed\n"); |
83 |
| - // CHECK: Test1 passed |
84 | 81 | ret += Run(argc - 1, 1, stack);
|
85 |
| - printf("Test2 passed\n"); |
86 |
| - // CHECK: Test2 passed |
87 | 82 | char *heap = new char[kStackSize + 1];
|
88 | 83 | ret += Run(argc - 1, 0, heap);
|
89 |
| - printf("Test3 passed\n"); |
90 |
| - // CHECK: Test3 passed |
91 | 84 | ret += Run(argc - 1, 1, heap);
|
92 |
| - printf("Test4 passed\n"); |
93 |
| - // CHECK: Test4 passed |
94 |
| - |
95 | 85 | delete [] heap;
|
96 | 86 | return ret;
|
97 | 87 | }
|
0 commit comments