Skip to content

Commit e931652

Browse files
author
Tor Didriksen
committed
Bug#35311585 merge_large_tests fails with clang in optimized mode
We were testing undefined behaviour, and there are now too many exceptions (compilers, flags, platforms) for when it is supposed to work. Just remove the test. Change-Id: I701043a028738aa5157171f21ec91888f33ccbec (cherry picked from commit e79855a83162d9bd14ba7ec47f9130a4b8200e98)
1 parent dc6b9e2 commit e931652

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

unittest/gunit/segfault-t.cc

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -142,36 +142,6 @@ TEST_F(FatalSignalDeathTest, CrashOnParallelAbort) {
142142
EXPECT_TRUE(contains_cached_result);
143143
}
144144

145-
TEST_F(FatalSignalDeathTest, Segfault) {
146-
#if defined(_WIN32)
147-
int *pint = NULL;
148-
/*
149-
After upgrading from gtest 1.5 to 1.6 this segfault is no longer
150-
caught by handle_fatal_signal(). We get an empty error message from the
151-
gtest library instead.
152-
*/
153-
EXPECT_DEATH_IF_SUPPORTED(*pint = 42, "");
154-
#elif defined(HAVE_ASAN)
155-
/* gcc 4.8.1 with '-fsanitize=address -O1' */
156-
/* Newer versions of ASAN give other error message, disable it */
157-
// EXPECT_DEATH_IF_SUPPORTED(*pint= 42, ".*ASAN:SIGSEGV.*");
158-
#elif defined(__APPLE__) && defined(__aarch64__) && defined(NDEBUG)
159-
// Disable also in non-debug mode on MacOS 11 arm, with -O1 or above, we get
160-
// Result: died but not with expected error.
161-
// Expected: contains regular expression ".* UTC - mysqld got signal .*"
162-
// Actual msg:
163-
// We do get: "Trace/BPT trap: 5" but not as part of the matcher input in
164-
// EXPECT_DEATH(statement, matcher);
165-
#elif defined(HANDLE_FATAL_SIGNALS)
166-
int *pint = nullptr;
167-
/*
168-
On most platforms we get SIGSEGV == 11, but SIGBUS == 10 is also possible.
169-
And on Mac OsX we can get SIGILL == 4 (but only in optimized mode).
170-
*/
171-
EXPECT_DEATH_IF_SUPPORTED(*pint = 42, ".* UTC - mysqld got signal .*");
172-
#endif
173-
}
174-
175145
// Verifies that my_safe_utoa behaves like sprintf(_, "%llu", _)
176146
TEST(PrintUtilities, Utoa) {
177147
char buff[22];

0 commit comments

Comments
 (0)