[ASan/Win] Print out a big warning and continue without checking for success if SymInitialize() fails
llvm-svn: 215203
This commit is contained in:
parent
12152ab92e
commit
255958391d
|
@ -40,8 +40,13 @@ class WinSymbolizer : public Symbolizer {
|
|||
// Anyways, we have to reconfigure stuff to make sure that SymInitialize
|
||||
// has all the appropriate options set.
|
||||
// Cross our fingers and reinitialize DbgHelp.
|
||||
CHECK(SymCleanup(GetCurrentProcess()));
|
||||
CHECK(TrySymInitialize());
|
||||
Report("*** WARNING: Failed to initialize DbgHelp! ***\n");
|
||||
Report("*** Most likely this means that the app is already ***\n");
|
||||
Report("*** using DbgHelp, possibly with incompatible flags. ***\n");
|
||||
Report("*** Due to technical reasons, symbolization might crash ***\n");
|
||||
Report("*** or produce wrong results. ***\n");
|
||||
SymCleanup(GetCurrentProcess());
|
||||
TrySymInitialize();
|
||||
}
|
||||
initialized_ = true;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,9 @@ int main() {
|
|||
if (!SymInitialize(GetCurrentProcess(), 0, FALSE))
|
||||
return 42;
|
||||
|
||||
*(int*)0 = 42;
|
||||
*(volatile int*)0 = 42;
|
||||
// CHECK: ERROR: AddressSanitizer: access-violation on unknown address
|
||||
// CHECK-NEXT: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-2]]
|
||||
// CHECK-NEXT: {{WARNING: .*DbgHelp}}
|
||||
// CHECK: {{#0 0x.* in main.*report_after_syminitialize.cc:}}[[@LINE-3]]
|
||||
// CHECK: AddressSanitizer can not provide additional info.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue