mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 10:45:47 +01:00
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
This commit is contained in:
parent
3f264d250b
commit
fd7870028f
@ -514,6 +514,12 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
|
|||||||
free(filename);
|
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
|
// Ensure that an extra memory block doesn't get added when the
|
||||||
// instruction pointer is not in mapped memory.
|
// instruction pointer is not in mapped memory.
|
||||||
TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
|
TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
|
||||||
@ -580,6 +586,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
|
|||||||
unlink(minidump_filename.c_str());
|
unlink(minidump_filename.c_str());
|
||||||
free(filename);
|
free(filename);
|
||||||
}
|
}
|
||||||
|
#endif // !ADDRESS_SANITIZER
|
||||||
|
|
||||||
static bool SimpleCallback(const char* dump_path,
|
static bool SimpleCallback(const char* dump_path,
|
||||||
const char* minidump_id,
|
const char* minidump_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user