]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/alloca_instruments_all_paddings.cc
1 // RUN: %clangxx_asan -O0 -mllvm -asan-instrument-allocas %s -o %t
2 // RUN: %clangxx_asan -O3 -mllvm -asan-instrument-allocas %s -o %t
6 #include "sanitizer/asan_interface.h"
9 __attribute__((noinline
)) void foo(int index
, int len
) {
10 volatile char str
[len
] __attribute__((aligned(32)));
11 assert(!(reinterpret_cast<long>(str
) & 31L));
12 char *q
= (char *)__asan_region_is_poisoned((char *)str
, 64);
13 assert(q
&& ((q
- str
) == index
));
16 int main(int argc
, char **argv
) {
17 for (int i
= 1; i
< 33; ++i
)
20 for (int i
= 1; i
< 33; ++i
)