Index: syzygy/agent/asan/reporters/crashpad_reporter.cc |
diff --git a/syzygy/agent/asan/reporters/crashpad_reporter.cc b/syzygy/agent/asan/reporters/crashpad_reporter.cc |
index 24cdb9ba19f6ac78e482f06b947ee948f32ef9a1..6d69cb47bb5339563eeefdc28dded13872183c42 100644 |
--- a/syzygy/agent/asan/reporters/crashpad_reporter.cc |
+++ b/syzygy/agent/asan/reporters/crashpad_reporter.cc |
@@ -70,6 +70,8 @@ bool EnsureCrashpadConnected() { |
} // namespace |
+const char CrashpadReporter::kName[] = "CrashpadReporter"; |
+ |
// static |
std::unique_ptr<CrashpadReporter> CrashpadReporter::Create() { |
// Create a crashpad reporter only if a crashpad instance is running for this |
@@ -82,7 +84,7 @@ std::unique_ptr<CrashpadReporter> CrashpadReporter::Create() { |
} |
const char* CrashpadReporter::GetName() const { |
- return "CrashpadReporter"; |
+ return kName; |
} |
uint32_t CrashpadReporter::GetFeatures() const { |
@@ -167,13 +169,15 @@ CrashpadReporter::CrashpadReporter(crashpad::CrashpadInfo* crashpad_info) |
: crashpad_info_(crashpad_info) { |
crash_keys_.reset(new crashpad::SimpleStringDictionary()); |
- // Initialize the crashpad info struct. |
+ // Initialize the crashpad info struct. Limit indirectly referenced memory to |
+ // a maximum of 1MB, so that crash reports come in at around 1.5-1.7MB. This |
+ // is similar to the size of SyzyAsan crash reports generated by MS tools. |
crashpad_info->set_crashpad_handler_behavior( |
crashpad::TriState::kEnabled); |
crashpad_info->set_system_crash_reporter_forwarding( |
crashpad::TriState::kDisabled); |
crashpad_info->set_gather_indirectly_referenced_memory( |
- crashpad::TriState::kEnabled); |
+ crashpad::TriState::kEnabled, 1 * 1024 * 1024); |
crashpad_info->set_simple_annotations(crash_keys_.get()); |
} |