[llvm-commits] [compiler-rt] r172398 - /compiler-rt/trunk/lib/asan/tests/asan_test.cc

Alexey Samsonov samsonov at google.com
Mon Jan 14 03:08:00 PST 2013


Author: samsonov
Date: Mon Jan 14 05:07:59 2013
New Revision: 172398

URL: http://llvm.org/viewvc/llvm-project?rev=172398&view=rev
Log:
ASan: Disable alloc/dealloc mismatch test on Android. It's not supposed to work there

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=172398&r1=172397&r2=172398&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Jan 14 05:07:59 2013
@@ -2060,9 +2060,9 @@
   Ident(NoAddressSafety)();
 }
 
-// TODO(glider): Enable this test on Mac when alloc/dealloc mismatch is
-// fixed there.
-#ifndef __APPLE__
+// TODO(glider): Enable this test on Mac.
+// It doesn't work on Android, as calls to new/delete go through malloc/free.
+#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__)
 static string MismatchStr(const string &str) {
   return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str;
 }
@@ -2081,7 +2081,7 @@
   EXPECT_DEATH(delete [] (Ident((int*)malloc(2 * sizeof(int)))),
                MismatchStr("malloc vs operator delete \\[\\]"));
 }
-#endif  // __APPLE__
+#endif
 
 // ------------------ demo tests; run each one-by-one -------------
 // e.g. --gtest_filter=*DemoOOBLeftHigh --gtest_also_run_disabled_tests





More information about the llvm-commits mailing list