mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +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);
|
SetUnhandledExceptionFilter(&UnhandledExceptionHandler);
|
||||||
|
|
||||||
// Windows swallows heap corruption failures but we can intercept them with
|
// Windows swallows heap corruption failures but we can intercept them with
|
||||||
// a vectored exception handler.
|
// a vectored exception handler. Note that a vectored exception handler is
|
||||||
#if defined(ADDRESS_SANITIZER)
|
// not compatible with or generally helpful in ASAN builds (ASAN inserts a
|
||||||
// Let ASAN have first go.
|
// bad dereference at the beginning of the handler, leading to recursive
|
||||||
bool go_first = false;
|
// invocation of the handler).
|
||||||
#else
|
#if !defined(ADDRESS_SANITIZER)
|
||||||
bool go_first = true;
|
PVOID handler = AddVectoredExceptionHandler(true, HandleHeapCorruption);
|
||||||
#endif
|
|
||||||
PVOID handler = AddVectoredExceptionHandler(go_first, HandleHeapCorruption);
|
|
||||||
vectored_handler_.reset(handler);
|
vectored_handler_.reset(handler);
|
||||||
|
#endif
|
||||||
|
|
||||||
// The Windows CRT's signal.h lists:
|
// The Windows CRT's signal.h lists:
|
||||||
// - SIGINT
|
// - SIGINT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user