summaryrefslogtreecommitdiff
path: root/lib/lsan
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-11-09 18:05:24 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-11-09 18:05:24 +0000
commitc3825cb83ded0b710b40add0c95adfebed544902 (patch)
tree7bce4ecec9fac431e54ce663e09fe7b1575bc035 /lib/lsan
parent623cb1d391f15595c8c2e9814d140db8bad9bddb (diff)
[compiler-rt] [asan] Use same shadow offset for aarch64
This patch makes ASAN for aarch64 use the same shadow offset for all currently supported VMAs (39 and 42 bits). The shadow offset is the same for 39-bit (36). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan')
-rw-r--r--lib/lsan/lsan_common.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/lsan/lsan_common.cc b/lib/lsan/lsan_common.cc
index 6600abb9a..1cffac443 100644
--- a/lib/lsan/lsan_common.cc
+++ b/lib/lsan/lsan_common.cc
@@ -120,7 +120,9 @@ static inline bool CanBeAHeapPointer(uptr p) {
#elif defined(__mips64)
return ((p >> 40) == 0);
#elif defined(__aarch64__)
- return ((p >> SANITIZER_AARCH64_VMA) == 0);
+ unsigned runtimeVMA =
+ (MostSignificantSetBitIndex(GET_CURRENT_FRAME()) + 1);
+ return ((p >> runtimeVMA) == 0);
#else
return true;
#endif