1 // Test that use-after-return works with exceptions.
2 // export ASAN_OPTIONS=detect_stack_use_after_return=1
3 // RUN: %clangxx_asan -O0 %s -o %t && %t
10 # define FRAME_SIZE 100
14 # define NUM_ITER 4000
21 void Func(int depth
) {
22 char frame
[FRAME_SIZE
];
30 int main(int argc
, char **argv
) {
31 for (int i
= 0; i
< NUM_ITER
; i
++) {
36 if ((i
% (NUM_ITER
/ 10)) == 0)
37 fprintf(stderr
, "done [%d]\n", i
);