Skip to content

Commit 1b9c02e

Browse files
author
Tor Didriksen
committed
Address sanitizer fix for unit test: different error message for segfault.
1 parent 62e0447 commit 1b9c02e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unittest/gunit/segfault-t.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ TEST_F(FatalSignalDeathTest, Segfault)
6161
gtest library instead.
6262
*/
6363
EXPECT_DEATH_IF_SUPPORTED(*pint= 42, "");
64+
#elif defined(__SANITIZE_ADDRESS__)
65+
/* gcc 4.8.1 with '-fsanitize=address -O1' */
66+
EXPECT_DEATH_IF_SUPPORTED(*pint= 42, ".*ASAN:SIGSEGV.*");
6467
#else
6568
/*
6669
On most platforms we get SIGSEGV == 11, but SIGBUS == 10 is also possible.

0 commit comments

Comments
 (0)