hwasan: Fix an off-by-one error in PrintTagsAroundAddr.

Previously we were printing 16 rows of tags, not 17.

Differential Revision: https://reviews.llvm.org/D63906

llvm-svn: 364609
This commit is contained in:
Peter Collingbourne 2019-06-27 23:24:36 +00:00
parent 5378afc02a
commit 559b2e0187
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ static void PrintTagsAroundAddr(tag_t *tag_ptr) {
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 ? "=>" : " ");