1 // RUN: %clangxx_asan -O0 %s -o %t
2 // RUN: %env_asan_opts=external_symbolizer_path=asdf not %run %t 2>&1 | FileCheck %s
3
4 #include <windows.h>
5 #include <dbghelp.h>
6
main()7 int main() {
8 // Make sure the RTL recovers from "no options enabled" dbghelp setup.
9 SymSetOptions(0);
10
11 // Make sure the RTL recovers from "fInvadeProcess=FALSE".
12 if (!SymInitialize(GetCurrentProcess(), 0, FALSE))
13 return 42;
14
15 *(volatile int*)0 = 42;
16 // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
17 // CHECK: The signal is caused by a WRITE memory access.
18 // CHECK: Hint: address points to the zero page.
19 // CHECK-NEXT: {{WARNING: Failed to use and restart external symbolizer}}
20 // CHECK-NEXT: {{WARNING: .*DbgHelp}}
21 // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-6]]
22 // CHECK: AddressSanitizer can not provide additional info.
23 }
24