[llvm] fbca90b - [unittest] Skip W+X MappedMemoryTests on OpenBSD (#89102)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 22:27:53 PDT 2024
Author: Brad Smith
Date: 2024-04-18T01:27:49-04:00
New Revision: fbca90b609f6c42ce7e4c9bb3ee8bd2c230a670c
URL: https://github.com/llvm/llvm-project/commit/fbca90b609f6c42ce7e4c9bb3ee8bd2c230a670c
DIFF: https://github.com/llvm/llvm-project/commit/fbca90b609f6c42ce7e4c9bb3ee8bd2c230a670c.diff
LOG: [unittest] Skip W+X MappedMemoryTests on OpenBSD (#89102)
OpenBSD uses W^X so the tests will not work.
Added:
Modified:
llvm/unittests/Support/MemoryTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Support/MemoryTest.cpp b/llvm/unittests/Support/MemoryTest.cpp
index 0164492829ccd7..9daa6d0ff9e4dd 100644
--- a/llvm/unittests/Support/MemoryTest.cpp
+++ b/llvm/unittests/Support/MemoryTest.cpp
@@ -40,7 +40,7 @@ bool IsMPROTECT() {
err(EXIT_FAILURE, "sysctl");
return !!(paxflags & CTL_PROC_PAXFLAGS_MPROTECT);
-#elif defined(__APPLE__) && defined(__aarch64__)
+#elif (defined(__APPLE__) && defined(__aarch64__)) || defined(__OpenBSD__)
return true;
#else
return false;
More information about the llvm-commits
mailing list