mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 06:31:50 +08:00
Stop registering Windows VEH in ASAN builds.
ASAN injects a bad de-reference in HandleHeapCorruption() that causes it to be recursively invoked. Bug: crashpad:464 Change-Id: I5e8db5555462166b963e0e43c6eb8ac0b327219e Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4935953 Reviewed-by: Alex Gough <ajgo@chromium.org> Commit-Queue: Rich Mckeever <mckeever@google.com>
This commit is contained in:
parent
0fc1b6ae78
commit
f145b54e83
@ -667,15 +667,14 @@ void CrashpadClient::RegisterHandlers() {
|
||||
SetUnhandledExceptionFilter(&UnhandledExceptionHandler);
|
||||
|
||||
// Windows swallows heap corruption failures but we can intercept them with
|
||||
// a vectored exception handler.
|
||||
#if defined(ADDRESS_SANITIZER)
|
||||
// Let ASAN have first go.
|
||||
bool go_first = false;
|
||||
#else
|
||||
bool go_first = true;
|
||||
#endif
|
||||
PVOID handler = AddVectoredExceptionHandler(go_first, HandleHeapCorruption);
|
||||
// a vectored exception handler. Note that a vectored exception handler is
|
||||
// not compatible with or generally helpful in ASAN builds (ASAN inserts a
|
||||
// bad dereference at the beginning of the handler, leading to recursive
|
||||
// invocation of the handler).
|
||||
#if !defined(ADDRESS_SANITIZER)
|
||||
PVOID handler = AddVectoredExceptionHandler(true, HandleHeapCorruption);
|
||||
vectored_handler_.reset(handler);
|
||||
#endif
|
||||
|
||||
// The Windows CRT's signal.h lists:
|
||||
// - SIGINT
|
||||
|
Loading…
x
Reference in New Issue
Block a user