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


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to