diff options
author | Kostya Serebryany <kcc@google.com> | 2013-01-23 11:14:21 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-01-23 11:14:21 +0000 |
commit | a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660 (patch) | |
tree | 205b3a0d3cd58dff22b4362565f5bdc9f89484c3 /lib/asan/asan_report.cc | |
parent | 95d058800ebe11a9fda03b10455500aa4a5b3edb (diff) | |
download | compiler-rt-a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660.tar.gz compiler-rt-a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660.tar.bz2 compiler-rt-a3b0e5e4f9f48b2ed0baee10c0236eda7c21c660.tar.xz |
[asan] simplify the code that poisons global redzones, add some more tests
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_report.cc')
-rw-r--r-- | lib/asan/asan_report.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asan/asan_report.cc b/lib/asan/asan_report.cc index 35ab9cab..cf57f625 100644 --- a/lib/asan/asan_report.cc +++ b/lib/asan/asan_report.cc @@ -186,7 +186,8 @@ static void PrintGlobalNameIfASCII(const __asan_global &g) { } bool DescribeAddressRelativeToGlobal(uptr addr, const __asan_global &g) { - if (addr < g.beg - kGlobalAndStackRedzone) return false; + static const uptr kMinimalDistanceFromAnotherGlobal = 64; + if (addr <= g.beg - kMinimalDistanceFromAnotherGlobal) return false; if (addr >= g.beg + g.size_with_redzone) return false; Decorator d; Printf("%s", d.Location()); |