aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-06 21:44:25 +0000
committerivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-08-06 21:44:25 +0000
commitfd7870028f2dd681fa3e84aa3eeda21f4639f1e5 (patch)
tree73471523005b8d725e1eb1316f172a4e453fa9cf /src
parentandroid: Add --abi option to android/run-checks.sh (diff)
downloadbreakpad-fd7870028f2dd681fa3e84aa3eeda21f4639f1e5.tar.xz
Conditionally compiling a unittest - based on whether AddressSanitizer is used.
http://breakpad.appspot.com/428002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1004 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/handler/exception_handler_unittest.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc
index ab3e3072..ea2652d5 100644
--- a/src/client/linux/handler/exception_handler_unittest.cc
+++ b/src/client/linux/handler/exception_handler_unittest.cc
@@ -514,6 +514,12 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
free(filename);
}
+// If AddressSanitizer is used, NULL pointer dereferences generate SIGILL
+// (illegal instruction) instead of SIGSEGV (segmentation fault). Also,
+// the number of memory regions differs, so there is no point in running
+// this test if AddressSanitizer is used.
+#ifndef ADDRESS_SANITIZER
+
// Ensure that an extra memory block doesn't get added when the
// instruction pointer is not in mapped memory.
TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
@@ -580,6 +586,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
unlink(minidump_filename.c_str());
free(filename);
}
+#endif // !ADDRESS_SANITIZER
static bool SimpleCallback(const char* dump_path,
const char* minidump_id,