diff --git a/client/crashpad_client_win_test.cc b/client/crashpad_client_win_test.cc index fb47ad72..99778baa 100644 --- a/client/crashpad_client_win_test.cc +++ b/client/crashpad_client_win_test.cc @@ -126,7 +126,13 @@ class HandlerLaunchFailureCrash : public WinMultiprocess { } }; -TEST(CrashpadClient, HandlerLaunchFailureCrash) { +#if defined(ADDRESS_SANITIZER) +// https://crbug.com/845011 +#define MAYBE_HandlerLaunchFailureCrash DISABLED_HandlerLaunchFailureCrash +#else +#define MAYBE_HandlerLaunchFailureCrash HandlerLaunchFailureCrash +#endif +TEST(CrashpadClient, MAYBE_HandlerLaunchFailureCrash) { WinMultiprocess::Run(); } @@ -150,7 +156,14 @@ class HandlerLaunchFailureDumpAndCrash : public WinMultiprocess { } }; -TEST(CrashpadClient, HandlerLaunchFailureDumpAndCrash) { +#if defined(ADDRESS_SANITIZER) +// https://crbug.com/845011 +#define MAYBE_HandlerLaunchFailureDumpAndCrash \ + DISABLED_HandlerLaunchFailureDumpAndCrash +#else +#define MAYBE_HandlerLaunchFailureDumpAndCrash HandlerLaunchFailureDumpAndCrash +#endif +TEST(CrashpadClient, MAYBE_HandlerLaunchFailureDumpAndCrash) { WinMultiprocess::Run(); } diff --git a/handler/BUILD.gn b/handler/BUILD.gn index f94e4e74..7928461b 100644 --- a/handler/BUILD.gn +++ b/handler/BUILD.gn @@ -112,6 +112,7 @@ source_set("handler_test") { if (crashpad_is_win) { data_deps = [ ":crashpad_handler_test_extended_handler", + ":fake_handler_that_crashes_at_startup", ] } } diff --git a/handler/crashpad_handler_test.cc b/handler/crashpad_handler_test.cc index 9c468ddf..afa12014 100644 --- a/handler/crashpad_handler_test.cc +++ b/handler/crashpad_handler_test.cc @@ -133,7 +133,13 @@ void CrashWithExtendedHandler::ValidateGeneratedDump() { EXPECT_EQ(found_extension_streams, 1u); } -TEST(CrashpadHandler, ExtensibilityCalloutsWork) { +#if defined(ADDRESS_SANITIZER) +// https://crbug.com/845011 +#define MAYBE_ExtensibilityCalloutsWork DISABLED_ExtensibilityCalloutsWork +#else +#define MAYBE_ExtensibilityCalloutsWork ExtensibilityCalloutsWork +#endif +TEST(CrashpadHandler, MAYBE_ExtensibilityCalloutsWork) { WinMultiprocessWithTempDir::Run(); } diff --git a/snapshot/win/exception_snapshot_win_test.cc b/snapshot/win/exception_snapshot_win_test.cc index 376de7c9..537b4ca8 100644 --- a/snapshot/win/exception_snapshot_win_test.cc +++ b/snapshot/win/exception_snapshot_win_test.cc @@ -163,7 +163,13 @@ void TestCrashingChild(TestPaths::Architecture architecture) { EXPECT_EQ(child.WaitForExit(), EXCEPTION_BREAKPOINT); } -TEST(ExceptionSnapshotWinTest, ChildCrash) { +#if defined(ADDRESS_SANITIZER) +// https://crbug.com/845011 +#define MAYBE_ChildCrash DISABLED_ChildCrash +#else +#define MAYBE_ChildCrash ChildCrash +#endif +TEST(ExceptionSnapshotWinTest, MAYBE_ChildCrash) { TestCrashingChild(TestPaths::Architecture::kDefault); } @@ -204,7 +210,13 @@ class SimulateDelegate : public ExceptionHandlerServer::Delegate { // Verify the dump was captured at the expected location with some slop // space. +#if defined(ADDRESS_SANITIZER) + // ASan instrumentation inserts more instructions between the expected + // location and what's reported. https://crbug.com/845011. + constexpr uint64_t kAllowedOffset = 500; +#else constexpr uint64_t kAllowedOffset = 100; +#endif EXPECT_GT(snapshot.Exception()->Context()->InstructionPointer(), dump_near_); EXPECT_LT(snapshot.Exception()->Context()->InstructionPointer(),