]>
git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/sanitizer_common/TestCases/Linux/assert.cc
1 // Test the handle_abort option.
4 // RUN: %clangxx %s -o %t
5 // RUN: not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
6 // RUN: %env_tool_opts=handle_abort=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
7 // RUN: %env_tool_opts=handle_abort=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
12 #include <sanitizer/asan_interface.h>
15 fprintf(stderr
, "DEATH CALLBACK\n");
18 int main(int argc
, char **argv
) {
19 __sanitizer_set_death_callback(death
);
23 // CHECK0-NOT: Sanitizer:DEADLYSIGNAL
24 // CHECK1: ERROR: {{.*}}Sanitizer: ABRT
26 // CHECK1: DEATH CALLBACK
27 // CHECK0-NOT: Sanitizer