[ORC] Fail materialization in tasks that are destroyed before running.
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / Linux / ill.cpp
blobfb9133ee80d06f964f19e698f67b8574af8d0ce0
1 // Test the handle_sigill option.
3 // RUN: %clangxx %s -o %t -O1
4 // RUN: not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
5 // RUN: %env_tool_opts=handle_sigill=0 not --crash %run %t 2>&1 | FileCheck --check-prefix=CHECK0 %s
6 // RUN: %env_tool_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK1 %s
8 // FIXME: seems to fail on ARM
9 // REQUIRES: x86_64-target-arch
10 #include <assert.h>
11 #include <stdio.h>
12 #include <sanitizer/asan_interface.h>
14 void death() {
15 fprintf(stderr, "DEATH CALLBACK\n");
18 int main(int argc, char **argv) {
19 __sanitizer_set_death_callback(death);
20 __builtin_trap();
23 // CHECK0-NOT: Sanitizer:DEADLYSIGNAL
24 // CHECK1: ERROR: {{.*}}Sanitizer: ILL
25 // CHECK1: {{#[0-9]+.* main .*ill\.cpp:[0-9]+}}
26 // CHECK1: DEATH CALLBACK
27 // CHECK0-NOT: Sanitizer