1 // Test the handle_abort option.
3 // RUN: %clangxx %s -o %t
4 // RUN: not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
5 // RUN: %env_tool_opts=handle_abort=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
6 // RUN: %env_tool_opts=handle_abort=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
10 #include <sanitizer/asan_interface.h>
13 fprintf(stderr
, "DEATH CALLBACK\n");
16 int main(int argc
, char **argv
) {
17 __sanitizer_set_death_callback(death
);
21 // CHECK0-NOT: Sanitizer:DEADLYSIGNAL
22 // CHECK1: ERROR: {{.*}}Sanitizer: ABRT
24 // CHECK1: DEATH CALLBACK
25 // CHECK0-NOT: Sanitizer