blob: faf5e35db5f54df3a2b7690ab2a22e954afc059b [file] [log] [blame]
Stephen Hines6d186232014-11-26 17:56:19 -08001// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
2
3#include <windows.h>
4#include <dbghelp.h>
5
6int main() {
7 // Make sure the RTL recovers from "no options enabled" dbghelp setup.
8 SymSetOptions(0);
9
10 // Make sure the RTL recovers from "fInvadeProcess=FALSE".
11 if (!SymInitialize(GetCurrentProcess(), 0, FALSE))
12 return 42;
13
14 *(volatile int*)0 = 42;
15 // CHECK: ERROR: AddressSanitizer: access-violation on unknown address
16 // CHECK-NEXT: {{WARNING: .*DbgHelp}}
17 // CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-3]]
18 // CHECK: AddressSanitizer can not provide additional info.
19}