aboutsummaryrefslogtreecommitdiff
path: root/test/msan/mmap_below_shadow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/msan/mmap_below_shadow.cc')
-rw-r--r--test/msan/mmap_below_shadow.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/msan/mmap_below_shadow.cc b/test/msan/mmap_below_shadow.cc
index 0b982d58930d..563d8774f525 100644
--- a/test/msan/mmap_below_shadow.cc
+++ b/test/msan/mmap_below_shadow.cc
@@ -3,10 +3,10 @@
// Without MAP_FIXED, we ignore the address hint and map somewhere in
// application range.
-// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 %s -o %t && %run %t
-// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 %s -o %t && %run %t
-// RUN: %clangxx_msan -m64 -O0 -DFIXED=0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
-// RUN: %clangxx_msan -m64 -O0 -DFIXED=1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
+// RUN: %clangxx_msan -O0 -DFIXED=0 %s -o %t && %run %t
+// RUN: %clangxx_msan -O0 -DFIXED=1 %s -o %t && %run %t
+// RUN: %clangxx_msan -O0 -DFIXED=0 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
+// RUN: %clangxx_msan -O0 -DFIXED=1 -D_FILE_OFFSET_BITS=64 %s -o %t && %run %t
#include <assert.h>
#include <errno.h>
@@ -15,12 +15,18 @@
int main(void) {
// Hint address just below shadow.
-#if defined(__x86_64__)
+#if defined(__FreeBSD__) && defined(__x86_64__)
+ uintptr_t hint = 0x0f0000000000ULL;
+ const uintptr_t app_start = 0x000000000000ULL;
+#elif defined(__x86_64__)
uintptr_t hint = 0x4f0000000000ULL;
const uintptr_t app_start = 0x600000000000ULL;
#elif defined (__mips64)
uintptr_t hint = 0x4f00000000ULL;
const uintptr_t app_start = 0x6000000000ULL;
+#elif defined (__powerpc64__)
+ uintptr_t hint = 0x2f0000000000ULL;
+ const uintptr_t app_start = 0x300000000000ULL;
#endif
uintptr_t p = (uintptr_t)mmap(
(void *)hint, 4096, PROT_WRITE,