summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/unittest/death_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/unittest/death_test.cpp b/src/mongo/unittest/death_test.cpp
index 3ada74ededb..31f98f37f9e 100644
--- a/src/mongo/unittest/death_test.cpp
+++ b/src/mongo/unittest/death_test.cpp
@@ -96,7 +96,10 @@ void sanitizerDieCallback() {
#endif
void DeathTestBase::_doTest() {
-#if defined(_WIN32)
+#if defined(__has_feature) && (__has_feature(address_sanitizer) || __has_feature(memory_sanitizer))
+ LOGV2(5306900, "Skipping death test in sanitizer build");
+ return;
+#elif defined(_WIN32)
LOGV2(24133, "Skipping death test on Windows");
return;
#elif defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH)