mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Have crashpad call ASan's crash handler if present
Upstreaming change made downstream in https://codereview.chromium.org/2504773002. Formatting modified slightly. R=mark@chromium.org, rnk@chromium.org BUG=661209 Change-Id: Iab8c4ffda3af24b7a61ec0a4a10b187966da481f Reviewed-on: https://chromium-review.googlesource.com/417237 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
f94dd14c45
commit
556c4e4f50
@ -109,7 +109,18 @@ StartupState BlockUntilHandlerStartedOrFailed() {
|
||||
return static_cast<StartupState>(startup_state);
|
||||
}
|
||||
|
||||
#if defined(ADDRESS_SANITIZER)
|
||||
extern "C" LONG __asan_unhandled_exception_filter(EXCEPTION_POINTERS* info);
|
||||
#endif
|
||||
|
||||
LONG WINAPI UnhandledExceptionHandler(EXCEPTION_POINTERS* exception_pointers) {
|
||||
#if defined(ADDRESS_SANITIZER)
|
||||
// In ASan builds, delegate to the ASan exception filter.
|
||||
LONG status = __asan_unhandled_exception_filter(exception_pointers);
|
||||
if (status != EXCEPTION_CONTINUE_SEARCH)
|
||||
return status;
|
||||
#endif
|
||||
|
||||
if (BlockUntilHandlerStartedOrFailed() == StartupState::kFailed) {
|
||||
// If we know for certain that the handler has failed to start, then abort
|
||||
// here, rather than trying to signal to a handler that will never arrive,
|
||||
|
Loading…
x
Reference in New Issue
Block a user