1 | // RUN: %clang_cl_asan %Od %s %Fe%t |
2 | // RUN: %env_asan_opts=handle_sigill=1 not %run %t 2>&1 | FileCheck %s |
3 | |
4 | // Test the error output from a breakpoint. Assertion-like macros often end in |
5 | // int3 on Windows. |
6 | |
7 | #include <stdio.h> |
8 | |
9 | int main() { |
10 | puts(s: "before breakpoint" ); |
11 | fflush(stdout); |
12 | __debugbreak(); |
13 | return 0; |
14 | } |
15 | // CHECK: before breakpoint |
16 | // CHECK: ERROR: AddressSanitizer: breakpoint on unknown address [[ADDR:0x[^ ]*]] |
17 | // CHECK-SAME: (pc [[ADDR]] {{.*}}) |
18 | // CHECK-NEXT: #0 {{.*}} in main {{.*}}breakpoint.cpp:{{.*}} |
19 | |