Skip to content

Commit f95a4a2

Browse files
committed
[scudo] Disable new/delete mismatch tests on Android.
Android does not do any checking of new/delete mismatches, so disable this test when compiling for Android. Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D152958
1 parent 623ad8a commit f95a4a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
#include <thread>
1818
#include <vector>
1919

20+
// Android does not support checking for new/delete mismatches.
21+
#if SCUDO_ANDROID
22+
#define SKIP_MISMATCH_TESTS 1
23+
#else
24+
#define SKIP_MISMATCH_TESTS 0
25+
#endif
26+
2027
void operator delete(void *, size_t) noexcept;
2128
void operator delete[](void *, size_t) noexcept;
2229

@@ -69,7 +76,7 @@ class Pixel {
6976
};
7077

7178
TEST(ScudoWrappersCppDeathTest, New) {
72-
if (getenv("SKIP_TYPE_MISMATCH")) {
79+
if (getenv("SKIP_TYPE_MISMATCH") || SKIP_MISMATCH_TESTS) {
7380
printf("Skipped type mismatch tests.\n");
7481
return;
7582
}

0 commit comments

Comments
 (0)