Debian Codegraph @

gcc/testsuite/c-c++-common/asan/sleep-before-dying-1.c

raw
1 /* { dg-do run } */
2 /* { dg-set-target-env-var ASAN_OPTIONS "sleep_before_dying=1" } */
3 /* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
4 /* { dg-options "-fno-builtin-malloc -fno-builtin-free" } */
5 /* { dg-shouldfail "asan" } */
6
7 #include <stdlib.h>
8 int main() {
9 char *x = (char*)malloc(10);
10 free(x);
11 return x[5];
12 }
13
14 /* { dg-output "Sleeping for 1 second" } */