Skip to content

Commit b647d8f

Browse files
committed
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
1 parent 6db9c34 commit b647d8f

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

compiler-rt/test/msan/mmap.cpp

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,10 @@ bool AddrIsApp(void *p) {
3333
uintptr_t start;
3434
uintptr_t end;
3535
} mappings[] = {
36-
{0x05000000000ULL, 0x06000000000ULL},
37-
{0x07000000000ULL, 0x08000000000ULL},
38-
{0x0F000000000ULL, 0x10000000000ULL},
39-
{0x11000000000ULL, 0x12000000000ULL},
40-
{0x20000000000ULL, 0x21000000000ULL},
41-
{0x2A000000000ULL, 0x2B000000000ULL},
42-
{0x2E000000000ULL, 0x2F000000000ULL},
43-
{0x3B000000000ULL, 0x3C000000000ULL},
44-
{0x3F000000000ULL, 0x40000000000ULL},
45-
{0x0041000000000ULL, 0x0042000000000ULL},
46-
{0x0050000000000ULL, 0x0051000000000ULL},
47-
{0x0058000000000ULL, 0x0059000000000ULL},
48-
{0x0061000000000ULL, 0x0062000000000ULL},
49-
{0x0AAAAA0000000ULL, 0x0AAAB00000000ULL},
50-
{0x0FFFF00000000ULL, 0x1000000000000ULL},
36+
{0x0000000000000ULL, 0x0100000000000ULL},
37+
{0x0A00000000000ULL, 0x0B00000000000ULL},
38+
{0x0E00000000000ULL, 0x0F00000000000ULL},
39+
{0x0F00000000000ULL, 0x1000000000000ULL},
5140
};
5241
const size_t mappingsSize = sizeof (mappings) / sizeof (mappings[0]);
5342

compiler-rt/test/msan/mmap_below_shadow.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ int main(void) {
3131
uintptr_t hint = 0x07f000000000ULL;
3232
const uintptr_t app_start = 0x020000000000ULL;
3333
#elif defined (__aarch64__)
34-
uintptr_t hint = 0x4f0000000ULL;
35-
const uintptr_t app_start = 0x7000000000ULL;
34+
uintptr_t hint = 0X0110000000000;
35+
// Unfortunately we don't have a stronger condition for this
36+
const uintptr_t app_start = 0x0ULL;
3637
#endif
3738
uintptr_t p = (uintptr_t)mmap(
3839
(void *)hint, 4096, PROT_WRITE,

0 commit comments

Comments
 (0)