[PATCH] D12709: [PATCH] [sanitizers] [msan] Enable MSAN for aarch64

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 12:50:52 PDT 2015


zatrazz added inline comments.

================
Comment at: test/msan/strlen_of_shadow.cc:31
@@ +30,3 @@
+  if (vma == 39)
+    return (char *)(LINEARIZE_MEM_39(p) + 0x4000000000ULL);
+  else if (vma == 42)
----------------
rengolin wrote:
> rengolin wrote:
> > Can't you just use the macro for now?
> Something like:
> 
>     #elif defined(__aarch64__)
>       #if SANITIZER_AARCH64_VMA == 39
>       #define LINEARIZE_MEM(mem) (((uintptr_t)(mem) & ~0x7C00000000ULL) ^ 0x100000000ULL)
>       #else
>       #define LINEARIZE_MEM(mem) (((uintptr_t)(mem) & ~0x3E000000000ULL) ^ 0x1000000000ULL)
>       #endif
>     return (char *)(LINEARIZE_MEM(p) + 0x4000000000ULL);
>     ...
SANITIZER_AARCH64_VMA is used within compiler-rt itself, not exported for tests. 


http://reviews.llvm.org/D12709





More information about the llvm-commits mailing list