]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/sanitizer_common/TestCases/Linux/ill.cc
1 // Test the handle_sigill option.
2 // RUN: %clang %s -o %t -O1
3 // RUN: not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
4 // RUN: %env_tool_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
5 // RUN: %env_tool_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
6 // FIXME: implement in other sanitizers, not just asan.
11 // FIXME: seems to fail on ARM
12 // REQUIRES: x86_64-target-arch
15 #include <sanitizer/asan_interface.h>
18 fprintf(stderr
, "DEATH CALLBACK\n");
21 int main(int argc
, char **argv
) {
22 __sanitizer_set_death_callback(death
);
25 // CHECK1: ERROR: {{.*}}Sanitizer:
26 // CHECK1: DEATH CALLBACK
27 // CHECK0-NOT: Sanitizer