Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 1 | // RUN: %clang_asan -O2 %s -o %t |
Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 2 | // RUN: %env_asan_opts=sleep_before_dying=1 not %run %t 2>&1 | FileCheck %s |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 3 | |
4 | #include <stdlib.h> | ||||
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 | } |