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

Unified Diff: syzygy/agent/asan/runtime.h

Issue 2576003002: Add the ability to defer the initialization of the SyzyAsan crash reporter. (Closed)
Patch Set: Fix comments. Created 3 years, 11 months 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 | « syzygy/agent/asan/rtl_impl_unittest.cc ('k') | syzygy/agent/asan/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/runtime.h
diff --git a/syzygy/agent/asan/runtime.h b/syzygy/agent/asan/runtime.h
index 2336e82a3cdc41ac4e93c774328f47e38866c4e0..f9a5d5679f85762f671852ccdcec4e57ffe3f5a0 100644
--- a/syzygy/agent/asan/runtime.h
+++ b/syzygy/agent/asan/runtime.h
@@ -149,6 +149,9 @@ class AsanRuntime {
// @names Accessors.
// {
uint64_t random_key() const { return random_key_; }
+ bool crash_reporter_initialized() const {
+ return crash_reporter_initialized_;
+ }
// @}
// Observes a given thread ID, adding it to thread ID set.
@@ -194,6 +197,17 @@ class AsanRuntime {
// @returns the list of enabled features.
AsanFeatureSet GetEnabledFeatureSet();
+ // Initialize the crash reporter used by the runtime.
+ //
+ // This function should only be called once during the runtime's lifetime,
+ // it could either be called at setup time if the deferred initialization
+ // flag hasn't been set on the command line or later by the instrumented
+ // image.
+ //
+ // Calling this when the crash reporter has already been initialized will
+ // terminate the process.
+ void InitializeCrashReporter();
+
protected:
// Propagate the values of the flags to the target modules.
void PropagateParams();
@@ -327,6 +341,9 @@ class AsanRuntime {
// is available.
std::unique_ptr<ReporterInterface> crash_reporter_;
+ // Indicates if the crash reporter has been initialized.
+ bool crash_reporter_initialized_;
+
DISALLOW_COPY_AND_ASSIGN(AsanRuntime);
};
« no previous file with comments | « syzygy/agent/asan/rtl_impl_unittest.cc ('k') | syzygy/agent/asan/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698