diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-05 14:32:03 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-02-05 14:32:03 +0000 |
commit | 589dcdaa520de1033a0f6112c9b67ab9eb7931af (patch) | |
tree | 13e07b68d080bbeb81bcfd6a5f01359406a9f501 /lib/asan/asan_report.h | |
parent | cf533b6c24c662c9548c25946211f5e1c9d299f9 (diff) |
[asan] Fix nonsensical reports of partial right OOB.
In case of partial right OOB, ASan was reporting
X is located 0 bytes to the right of [A, B)
where X was actually inside [A, B).
With this change, ASan will report B as the error address in such case.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@174373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_report.h')
-rw-r--r-- | lib/asan/asan_report.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/asan/asan_report.h b/lib/asan/asan_report.h index dd991229c..55a8039dc 100644 --- a/lib/asan/asan_report.h +++ b/lib/asan/asan_report.h @@ -21,8 +21,9 @@ namespace __asan { // The following functions prints address description depending // on the memory type (shadow/heap/stack/global). void DescribeHeapAddress(uptr addr, uptr access_size); -bool DescribeAddressIfGlobal(uptr addr); -bool DescribeAddressRelativeToGlobal(uptr addr, const __asan_global &g); +bool DescribeAddressIfGlobal(uptr addr, uptr access_size); +bool DescribeAddressRelativeToGlobal(uptr addr, uptr access_size, + const __asan_global &g); bool DescribeAddressIfShadow(uptr addr); bool DescribeAddressIfStack(uptr addr, uptr access_size); // Determines memory type on its own. |