Skip to content

Commit 6eaaf09

Browse files
committed
[NFC][hwasan] Add a few const
1 parent 35e3939 commit 6eaaf09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler-rt/lib/hwasan/hwasan_report.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,8 @@ class TagMismatchReport : public BaseReport {
902902
~TagMismatchReport();
903903

904904
private:
905-
bool is_store;
906-
uptr *registers_frame;
905+
const bool is_store;
906+
const uptr *registers_frame;
907907
};
908908

909909
TagMismatchReport::~TagMismatchReport() {
@@ -987,7 +987,7 @@ void ReportTagMismatch(StackTrace *stack, uptr tagged_addr, uptr access_size,
987987

988988
// See the frame breakdown defined in __hwasan_tag_mismatch (from
989989
// hwasan_tag_mismatch_{aarch64,riscv64}.S).
990-
void ReportRegisters(uptr *frame, uptr pc) {
990+
void ReportRegisters(const uptr *frame, uptr pc) {
991991
Printf("Registers where the failure occurred (pc %p):\n", pc);
992992

993993
// We explicitly print a single line (4 registers/line) each iteration to

compiler-rt/lib/hwasan/hwasan_report.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void ReportTagMismatch(StackTrace *stack, uptr addr, uptr access_size,
2626
void ReportInvalidFree(StackTrace *stack, uptr addr);
2727
void ReportTailOverwritten(StackTrace *stack, uptr addr, uptr orig_size,
2828
const u8 *expected);
29-
void ReportRegisters(uptr *registers_frame, uptr pc);
29+
void ReportRegisters(const uptr *registers_frame, uptr pc);
3030
void ReportAtExitStatistics();
3131

3232

0 commit comments

Comments
 (0)