[PATCH] D73515: [asan] Fix test compilation on Android API <= 17

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 14:44:07 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd8f6950828df: [asan] Fix test compilation on Android API <= 17 (authored by smeenai).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73515/new/

https://reviews.llvm.org/D73515

Files:
  compiler-rt/lib/asan/tests/asan_test.cpp


Index: compiler-rt/lib/asan/tests/asan_test.cpp
===================================================================
--- compiler-rt/lib/asan/tests/asan_test.cpp
+++ compiler-rt/lib/asan/tests/asan_test.cpp
@@ -1157,9 +1157,13 @@
 
 #if !defined(_WIN32)
 TEST(AddressSanitizer, MlockTest) {
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 17
   EXPECT_EQ(0, mlockall(MCL_CURRENT));
+#endif
   EXPECT_EQ(0, mlock((void*)0x12345, 0x5678));
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 17
   EXPECT_EQ(0, munlockall());
+#endif
   EXPECT_EQ(0, munlock((void*)0x987, 0x654));
 }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73515.241003.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200128/929bc9a1/attachment.bin>


More information about the llvm-commits mailing list