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

Unified Diff: syzygy/agent/asan/rtl_impl_unittest.cc

Issue 2576003002: Add the ability to defer the initialization of the SyzyAsan crash reporter. (Closed)
Patch Set: Add an entry point to reinitialize the crash reporter. Created 4 years 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
Index: syzygy/agent/asan/rtl_impl_unittest.cc
diff --git a/syzygy/agent/asan/rtl_impl_unittest.cc b/syzygy/agent/asan/rtl_impl_unittest.cc
index 4a8426db9e6c520c560ccc71acdb101b8e13dfe5..848ace810f293462cda7a049d5827d47a24a6abd 100644
--- a/syzygy/agent/asan/rtl_impl_unittest.cc
+++ b/syzygy/agent/asan/rtl_impl_unittest.cc
@@ -18,6 +18,7 @@
#include "base/rand_util.h"
#include "gtest/gtest.h"
+#include "syzygy/agent/asan/reporter.h"
#include "syzygy/agent/asan/runtime.h"
#include "syzygy/agent/asan/shadow.h"
#include "syzygy/agent/asan/unittest_util.h"
@@ -151,3 +152,11 @@ TEST_F(AsanRtlImplTest, SetInformationWithNullHeapPtr) {
asan_HeapSetInformation(NULL, HeapEnableTerminationOnCorruption,
NULL, 0));
}
+
+TEST_F(AsanRtlImplTest, ReinitializeCrashHandler) {
+ agent::asan::ReporterInterface* reporter = asan_runtime_.crash_reporter();
Sébastien Marchand 2016/12/14 22:56:25 This test doesn't work as this test fixture can't
+ EXPECT_NE(nullptr, reporter);
+ asan_ReinitializeCrashHandler();
+ EXPECT_NE(nullptr, asan_runtime_.crash_reporter());
+ EXPECT_NE(reporter, asan_runtime_.crash_reporter());
+}

Powered by Google App Engine
This is Rietveld 408576698