diff options
Diffstat (limited to 'test/msan/strlen_of_shadow.cc')
-rw-r--r-- | test/msan/strlen_of_shadow.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/msan/strlen_of_shadow.cc b/test/msan/strlen_of_shadow.cc index 8f1b4e1fc6bb..763b3a1c73c0 100644 --- a/test/msan/strlen_of_shadow.cc +++ b/test/msan/strlen_of_shadow.cc @@ -1,4 +1,4 @@ -// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t +// RUN: %clangxx_msan -O0 %s -o %t && %run %t // Check that strlen() and similar intercepted functions can be called on shadow // memory. @@ -13,6 +13,10 @@ const char *mem_to_shadow(const char *p) { return (char *)((uintptr_t)p & ~0x400000000000ULL); #elif defined (__mips64) return (char *)((uintptr_t)p & ~0x4000000000ULL); +#elif defined(__powerpc64__) +#define LINEARIZE_MEM(mem) \ + (((uintptr_t)(mem) & ~0x200000000000ULL) ^ 0x100000000000ULL) + return (char *)(LINEARIZE_MEM(p) + 0x080000000000ULL); #endif } |