[llvm] [unittest] Skip W+X MappedMemoryTests on OpenBSD (PR #89102)
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 10:16:55 PDT 2024
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/89102
OpenBSD uses W^X so the tests will not work.
>From 260db952ae06d8b3b6cad0ee0a0e6b6cfc845b72 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Wed, 17 Apr 2024 13:11:36 -0400
Subject: [PATCH] [unittest] Skip W+X MappedMemoryTests on OpenBSD
OpenBSD uses W^X so the tests will not work.
---
llvm/unittests/Support/MemoryTest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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