Index: third_party/crashpad/crashpad/client/crashpad_client_win.cc |
diff --git a/third_party/crashpad/crashpad/client/crashpad_client_win.cc b/third_party/crashpad/crashpad/client/crashpad_client_win.cc |
index 235ef1858e85b421170e4dd56827d24ffeb2196f..78c1ed0d20526e870ed94debf6228edc5dc7cdb1 100644 |
--- a/third_party/crashpad/crashpad/client/crashpad_client_win.cc |
+++ b/third_party/crashpad/crashpad/client/crashpad_client_win.cc |
@@ -107,7 +107,19 @@ 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) { |
+ // In ASan builds, delegate to the ASan exception filter. |
+#if defined(ADDRESS_SANITIZER) |
+ 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, |