From 4c048c97644b0cbc77d6f982afdc7b04928ac65d Mon Sep 17 00:00:00 2001 From: "vapier@chromium.org" Date: Wed, 11 Dec 2013 05:38:34 +0000 Subject: disable unittests under ASAN that use memory crashes There are a bunch of tests that use invalid memory acesses (on purpose) to trigger a crash so that we can detect things are dumped correctly. When we run under ASAN, it catches those accesses and the breaks the testing flow. For now, use the existing ADDRESS_SANITIZER symbol to disable more tests. Ideally we'd use a compile-time attribute to disable ASAN on a few funcs, but that seems to be broken atm. BUG=chromium:293519 BUG=chromium:304575 TEST=ran unittests under ASAN and they now pass TEST=ran unittests w/out asan/clang and they still pass R=benchan@chromium.org Review URL: https://breakpad.appspot.com/884002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1255 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/windows/unittests/exception_handler_death_test.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/windows') diff --git a/src/client/windows/unittests/exception_handler_death_test.cc b/src/client/windows/unittests/exception_handler_death_test.cc index 3a16e525..079ca3d6 100644 --- a/src/client/windows/unittests/exception_handler_death_test.cc +++ b/src/client/windows/unittests/exception_handler_death_test.cc @@ -307,6 +307,8 @@ wstring find_minidump_in_directory(const wstring &directory) { return filename; } +#ifndef ADDRESS_SANITIZER + TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) { ASSERT_TRUE(DoesPathExist(temp_path_)); scoped_ptr exc( @@ -575,4 +577,6 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMaxBound) { DeleteFileW(minidump_filename_wide.c_str()); } +#endif // !ADDRESS_SANITIZER + } // namespace -- cgit v1.2.1