[compiler-rt] f95a4a2 - [scudo] Disable new/delete mismatch tests on Android.

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 16:08:04 PDT 2023


Author: Christopher Ferris
Date: 2023-06-14T16:07:50-07:00
New Revision: f95a4a2833e60d72886e8c6f8b0187373bb26ed8

URL: https://github.com/llvm/llvm-project/commit/f95a4a2833e60d72886e8c6f8b0187373bb26ed8
DIFF: https://github.com/llvm/llvm-project/commit/f95a4a2833e60d72886e8c6f8b0187373bb26ed8.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
index a88dc4aacd57f..fef12f60dc3e1 100644
--- a/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
@@ -17,6 +17,13 @@
 #include <thread>
 #include <vector>
 
+// Android does not support checking for new/delete mismatches.
+#if SCUDO_ANDROID
+#define SKIP_MISMATCH_TESTS 1
+#else
+#define SKIP_MISMATCH_TESTS 0
+#endif
+
 void operator delete(void *, size_t) noexcept;
 void operator delete[](void *, size_t) noexcept;
 
@@ -69,7 +76,7 @@ class Pixel {
 };
 
 TEST(ScudoWrappersCppDeathTest, New) {
-  if (getenv("SKIP_TYPE_MISMATCH")) {
+  if (getenv("SKIP_TYPE_MISMATCH") || SKIP_MISMATCH_TESTS) {
     printf("Skipped type mismatch tests.\n");
     return;
   }


        


More information about the llvm-commits mailing list