[compiler-rt] b647d8f - msan: update tests for new memory mappings on aarch64
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 10:20:04 PST 2022
Author: Thurston Dang
Date: 2022-11-30T18:19:54Z
New Revision: b647d8f95d194e15d0335a644947c650f97041df
URL: https://github.com/llvm/llvm-project/commit/b647d8f95d194e15d0335a644947c650f97041df
DIFF: https://github.com/llvm/llvm-project/commit/b647d8f95d194e15d0335a644947c650f97041df.diff
LOG: msan: update tests for new memory mappings on aarch64
D137666 changed the memory mappings for msan on aarch64.
This patch updates two more tests to match the new
mappings.
Differential Revision: https://reviews.llvm.org/D139033
Added:
Modified:
compiler-rt/test/msan/mmap.cpp
compiler-rt/test/msan/mmap_below_shadow.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/msan/mmap.cpp b/compiler-rt/test/msan/mmap.cpp
index 2e7e883c863a..0a085b2076e1 100644
--- a/compiler-rt/test/msan/mmap.cpp
+++ b/compiler-rt/test/msan/mmap.cpp
@@ -33,21 +33,10 @@ bool AddrIsApp(void *p) {
uintptr_t start;
uintptr_t end;
} mappings[] = {
- {0x05000000000ULL, 0x06000000000ULL},
- {0x07000000000ULL, 0x08000000000ULL},
- {0x0F000000000ULL, 0x10000000000ULL},
- {0x11000000000ULL, 0x12000000000ULL},
- {0x20000000000ULL, 0x21000000000ULL},
- {0x2A000000000ULL, 0x2B000000000ULL},
- {0x2E000000000ULL, 0x2F000000000ULL},
- {0x3B000000000ULL, 0x3C000000000ULL},
- {0x3F000000000ULL, 0x40000000000ULL},
- {0x0041000000000ULL, 0x0042000000000ULL},
- {0x0050000000000ULL, 0x0051000000000ULL},
- {0x0058000000000ULL, 0x0059000000000ULL},
- {0x0061000000000ULL, 0x0062000000000ULL},
- {0x0AAAAA0000000ULL, 0x0AAAB00000000ULL},
- {0x0FFFF00000000ULL, 0x1000000000000ULL},
+ {0x0000000000000ULL, 0x0100000000000ULL},
+ {0x0A00000000000ULL, 0x0B00000000000ULL},
+ {0x0E00000000000ULL, 0x0F00000000000ULL},
+ {0x0F00000000000ULL, 0x1000000000000ULL},
};
const size_t mappingsSize = sizeof (mappings) / sizeof (mappings[0]);
diff --git a/compiler-rt/test/msan/mmap_below_shadow.cpp b/compiler-rt/test/msan/mmap_below_shadow.cpp
index 46d948c9a5eb..13d3625178a4 100644
--- a/compiler-rt/test/msan/mmap_below_shadow.cpp
+++ b/compiler-rt/test/msan/mmap_below_shadow.cpp
@@ -31,8 +31,9 @@ int main(void) {
uintptr_t hint = 0x07f000000000ULL;
const uintptr_t app_start = 0x020000000000ULL;
#elif defined (__aarch64__)
- uintptr_t hint = 0x4f0000000ULL;
- const uintptr_t app_start = 0x7000000000ULL;
+ uintptr_t hint = 0X0110000000000;
+ // Unfortunately we don't have a stronger condition for this
+ const uintptr_t app_start = 0x0ULL;
#endif
uintptr_t p = (uintptr_t)mmap(
(void *)hint, 4096, PROT_WRITE,
More information about the llvm-commits
mailing list