Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2652)

Unified Diff: third_party/crashpad/crashpad/client/crashpad_client_win.cc

Issue 2504773002: Have crashpad call ASan's crash handler if present (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/crashpad/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « third_party/crashpad/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698