Crashpad: Explicitly enable handling if crashpad is enabled

This defaults to kUnset, which is interpreted as enabled by vanilla
Crashpad. We want to turn that around, so we have more control over
which processes are handled by Crashpad.

Change-Id: I877acd5b6fa1e222648f031e68be3837422e96d9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2025-01-13 08:46:48 +01:00
parent 16c697cfa1
commit e03a924992

View File

@@ -450,6 +450,11 @@ void startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
->set_gather_indirectly_referenced_memory(crashpad::TriState::kEnabled, 0); ->set_gather_indirectly_referenced_memory(crashpad::TriState::kEnabled, 0);
} }
// Explicitly enable Crashpad handling. This is the default in vanilla Crashpad,
// but we use a version that only handles processes that enable it explicitly,
// so we do not handle arbitrary subprocesses
CrashpadInfo::GetCrashpadInfo()->set_crashpad_handler_behavior(crashpad::TriState::kEnabled);
// Optional arguments to pass to the handler // Optional arguments to pass to the handler
std::vector<std::string> arguments; std::vector<std::string> arguments;
arguments.push_back("--no-rate-limit"); arguments.push_back("--no-rate-limit");