[llvm-branch-commits] [llvm] eaa0982 - [mac/arm] skip MappedMemoryTest that try to map w+x

Nico Weber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Dec 12 16:52:34 PST 2020


Author: Nico Weber
Date: 2020-12-12T19:46:32-05:00
New Revision: eaa09823348a7ba20417c109f4d7b26258c6abe6

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

LOG: [mac/arm] skip MappedMemoryTest that try to map w+x

macOS/arm is w^x, so these tests don't work. Fixes these failures:

  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndReleaseHuge/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.BasicWrite/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/4
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleWrite/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/5
  LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/5

Part of PR46647.

Added: 
    

Modified: 
    llvm/unittests/Support/MemoryTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/MemoryTest.cpp b/llvm/unittests/Support/MemoryTest.cpp
index af33dc32c81b..6e5f7472e454 100644
--- a/llvm/unittests/Support/MemoryTest.cpp
+++ b/llvm/unittests/Support/MemoryTest.cpp
@@ -41,6 +41,8 @@ bool IsMPROTECT() {
     err(EXIT_FAILURE, "sysctl");
 
   return !!(paxflags & CTL_PROC_PAXFLAGS_MPROTECT);
+#elif defined(__APPLE__) && defined(__aarch64__)
+  return true;
 #else
   return false;
 #endif


        


More information about the llvm-branch-commits mailing list