]>
git.proxmox.com Git - rustc.git/blob - src/llvm/projects/compiler-rt/lib/asan/lit_tests/deep_stack_uaf.cc
1 // Check that we can store lots of stack frames if asked to.
3 // RUN: %clangxx_asan -m64 -O0 %s -o %t 2>&1
4 // RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \
5 // RUN: %symbolize | FileCheck %s
7 // RUN: %clangxx_asan -m32 -O0 %s -o %t 2>&1
8 // RUN: ASAN_OPTIONS=malloc_context_size=120:redzone=512 %t 2>&1 | \
9 // RUN: %symbolize | FileCheck %s
15 static void free(char *x
) {
16 DeepFree
<depth
- 1>::free(x
);
22 static void free(char *x
) {
28 char *x
= new char[10];
30 DeepFree
<200>::free(x
);
32 // CHECK: {{.*ERROR: AddressSanitizer heap-use-after-free on address}}
33 // CHECK: DeepFree<36>
34 // CHECK: DeepFree<98>
35 // CHECK: DeepFree<115>