Skip to content

Commit 58fdfe7

Browse files
committed
[NFC][hwasan] More consts in BaseReport (#66682)
1 parent 171d8c4 commit 58fdfe7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler-rt/lib/hwasan/hwasan_report.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static void PrintTagsAroundAddr(tag_t *tag_ptr) {
373373
"description of short granule tags\n");
374374
}
375375

376-
static uptr GetTopPc(StackTrace *stack) {
376+
static uptr GetTopPc(const StackTrace *stack) {
377377
return stack->size ? StackTrace::GetPreviousInstructionPc(stack->trace[0])
378378
: 0;
379379
}
@@ -417,12 +417,12 @@ class BaseReport {
417417
void PrintAddressDescription() const;
418418
void PrintHeapOrGlobalCandidate() const;
419419

420-
ScopedReport scoped_report;
421-
StackTrace *stack = nullptr;
422-
uptr tagged_addr = 0;
423-
uptr access_size = 0;
424-
uptr untagged_addr = 0;
425-
tag_t ptr_tag = 0;
420+
const ScopedReport scoped_report;
421+
const StackTrace *stack = nullptr;
422+
const uptr tagged_addr = 0;
423+
const uptr access_size = 0;
424+
const uptr untagged_addr = 0;
425+
const tag_t ptr_tag = 0;
426426

427427
uptr stack_allocations_count = 0;
428428
SavedStackAllocations stack_allocations[16];
@@ -753,7 +753,7 @@ class TailOverwrittenReport : public BaseReport {
753753
~TailOverwrittenReport();
754754

755755
private:
756-
uptr orig_size;
756+
const uptr orig_size;
757757
const u8 *expected;
758758
};
759759

0 commit comments

Comments
 (0)