xref: /aosp_15_r20/external/compiler-rt/test/asan/TestCases/sleep_before_dying.c (revision 7c3d14c8b49c529e04be81a3ce6f5cc23712e4c6)
1 // RUN: %clang_asan -O2 %s -o %t
2 // RUN: %env_asan_opts=sleep_before_dying=1 not %run %t 2>&1 | FileCheck %s
3 
4 #include <stdlib.h>
main()5 int main() {
6   char *x = (char*)malloc(10 * sizeof(char));
7   free(x);
8   return x[5];
9   // CHECK: Sleeping for 1 second
10 }
11