diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-01-21 10:51:18 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-01-21 10:51:18 +0000 |
commit | ee485d42c43635f874e3197f636280a6b0f8c545 (patch) | |
tree | 1815c9ef8cabe478fb6f2175049ed280f86ac284 /lib/asan/asan_mapping.h | |
parent | 6935071be08d83963a0eaf2377f3fffb8b56f328 (diff) |
ASan: build unit tests with -fsanitize-address-zero-base-shadow on Linux and Android
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_mapping.h')
-rw-r--r-- | lib/asan/asan_mapping.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/asan_mapping.h b/lib/asan/asan_mapping.h index 5e3067031..8decdf337 100644 --- a/lib/asan/asan_mapping.h +++ b/lib/asan/asan_mapping.h @@ -111,6 +111,10 @@ static inline bool AddrIsInShadow(uptr a) { } static inline bool AddrIsInShadowGap(uptr a) { + // In zero-based shadow mode we treat addresses near zero as addresses + // in shadow gap as well. + if (ASAN_FLEXIBLE_MAPPING_AND_OFFSET) + return a <= kShadowGapEnd; return a >= kShadowGapBeg && a <= kShadowGapEnd; } |