summaryrefslogtreecommitdiff
path: root/test/msan/mmap.cc
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-10-08 21:35:34 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-10-08 21:35:34 +0000
commit0bee2d927c97454e629b0789c7f4e3d509cf4178 (patch)
tree059f7c7be0e3140acf62c6cf6765e196028696cc /test/msan/mmap.cc
parent1d9c340a24ab792b27461b1f08601b33dd4e0c9d (diff)
New MSan mapping layout (compiler-rt part).
This is an implementation of https://github.com/google/sanitizers/issues/579 It has a number of advantages over the current mapping: * Works for non-PIE executables. * Does not require ASLR; as a consequence, debugging MSan programs in gdb no longer requires "set disable-randomization off". * Supports linux kernels >=4.1.2. * The code is marginally faster and smaller. This is an ABI break. We never really promised ABI stability, but this patch includes a courtesy escape hatch: a compile-time macro that reverts back to the old mapping layout. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/msan/mmap.cc')
-rw-r--r--test/msan/mmap.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/msan/mmap.cc b/test/msan/mmap.cc
index 250ce343c..962836cd6 100644
--- a/test/msan/mmap.cc
+++ b/test/msan/mmap.cc
@@ -15,7 +15,9 @@ bool AddrIsApp(void *p) {
#if defined(__FreeBSD__) && defined(__x86_64__)
return addr < 0x010000000000ULL || addr >= 0x600000000000ULL;
#elif defined(__x86_64__)
- return addr >= 0x600000000000ULL;
+ return (addr >= 0x000000000000ULL && addr < 0x010000000000ULL) ||
+ (addr >= 0x510000000000ULL && addr < 0x600000000000ULL) ||
+ (addr >= 0x700000000000ULL && addr < 0x800000000000ULL);
#elif defined(__mips64)
return addr >= 0x00e000000000ULL;
#elif defined(__powerpc64__)