Skip to content

Commit

Permalink
[NFC][hwasan] Add CHECK_LT(fp, kRecordFPModulus)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed Feb 15, 2024
1 parent 2c45bda commit fbacf70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler-rt/lib/hwasan/hwasan_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ static void PrintStackAllocations(const StackAllocationsRingBuffer *sa,
break;
tag_t base_tag =
reinterpret_cast<uptr>(record_addr) >> kRecordAddrBaseTagShift;
uptr fp = (record >> kRecordFPShift) << kRecordFPLShift;
const uptr fp = (record >> kRecordFPShift) << kRecordFPLShift;
CHECK_LT(fp, kRecordFPModulus);
uptr pc_mask = (1ULL << kRecordFPShift) - 1;
uptr pc = record & pc_mask;
FrameInfo frame;
Expand Down

0 comments on commit fbacf70

Please sign in to comment.