[PATCH] D63906: hwasan: Fix an off-by-one error in PrintTagsAroundAddr.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 16:29:11 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL364609: hwasan: Fix an off-by-one error in PrintTagsAroundAddr. (authored by pcc, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D63906?vs=206961&id=206962#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63906/new/
https://reviews.llvm.org/D63906
Files:
compiler-rt/trunk/lib/hwasan/hwasan_report.cpp
Index: compiler-rt/trunk/lib/hwasan/hwasan_report.cpp
===================================================================
--- compiler-rt/trunk/lib/hwasan/hwasan_report.cpp
+++ compiler-rt/trunk/lib/hwasan/hwasan_report.cpp
@@ -335,7 +335,7 @@
tag_t *center_row_beg = reinterpret_cast<tag_t *>(
RoundDownTo(reinterpret_cast<uptr>(tag_ptr), row_len));
tag_t *beg_row = center_row_beg - row_len * (num_rows / 2);
- tag_t *end_row = center_row_beg + row_len * (num_rows / 2);
+ tag_t *end_row = center_row_beg + row_len * ((num_rows + 1) / 2);
InternalScopedString s(GetPageSizeCached() * 8);
for (tag_t *row = beg_row; row < end_row; row += row_len) {
s.append("%s", row == center_row_beg ? "=>" : " ");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63906.206962.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190627/289c0bb3/attachment.bin>
More information about the llvm-commits
mailing list