Commit 5261640d authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Commit Bot

GWP-ASan: Wire crash handler into crash component

Add the GWP-ASan crash handler hook to the list of user stream data
sources in the Windows crashpad process. The GWP-ASan crash handler
inspects crashes, and if they are related to a GWP-ASan allocation, adds
additional debugging data to the minidump.

CQ-DEPEND=CL:1330283

Bug: 896019
Change-Id: I0b38c60cd46c029200240560fdb714fbd2087f70
Reviewed-on: https://chromium-review.googlesource.com/c/1338324
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611472}
parent f13cd5bf
...@@ -126,6 +126,7 @@ if (is_win) { ...@@ -126,6 +126,7 @@ if (is_win) {
deps = [ deps = [
"//base", "//base",
"//components/browser_watcher:crash_stability", "//components/browser_watcher:crash_stability",
"//components/gwp_asan/crash_handler",
"//third_party/crashpad/crashpad/client", "//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/handler", "//third_party/crashpad/crashpad/handler",
"//third_party/crashpad/crashpad/minidump", "//third_party/crashpad/crashpad/minidump",
......
...@@ -2,6 +2,7 @@ include_rules = [ ...@@ -2,6 +2,7 @@ include_rules = [
"+sandbox", "+sandbox",
"+components/browser_watcher/stability_report_user_stream_data_source.h", "+components/browser_watcher/stability_report_user_stream_data_source.h",
"+components/gwp_asan/crash_handler/crash_handler.h",
"+content/public/common/content_descriptors.h", "+content/public/common/content_descriptors.h",
"+content/public/common/result_codes.h", "+content/public/common/result_codes.h",
"+third_party/crashpad", "+third_party/crashpad",
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "components/browser_watcher/stability_report_user_stream_data_source.h" #include "components/browser_watcher/stability_report_user_stream_data_source.h"
#include "components/gwp_asan/crash_handler/crash_handler.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h" #include "third_party/crashpad/crashpad/client/crashpad_info.h"
#include "third_party/crashpad/crashpad/client/simple_string_dictionary.h" #include "third_party/crashpad/crashpad/client/simple_string_dictionary.h"
#include "third_party/crashpad/crashpad/handler/handler_main.h" #include "third_party/crashpad/crashpad/handler/handler_main.h"
...@@ -83,6 +84,9 @@ int RunAsCrashpadHandler(const base::CommandLine& command_line, ...@@ -83,6 +84,9 @@ int RunAsCrashpadHandler(const base::CommandLine& command_line,
user_data_dir)); user_data_dir));
} }
user_stream_data_sources.push_back(
std::make_unique<gwp_asan::UserStreamDataSource>());
return crashpad::HandlerMain(static_cast<int>(storage.size()), return crashpad::HandlerMain(static_cast<int>(storage.size()),
argv_as_utf8.get(), &user_stream_data_sources); argv_as_utf8.get(), &user_stream_data_sources);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment