[compiler-rt] 8519d4f - [NFC][hwasan] Add access_size into base report (#66682)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 18:22:43 PDT 2023
Author: Vitaly Buka
Date: 2023-09-18T18:21:40-07:00
New Revision: 8519d4fda1a186176805666c1b53ae7566f24b0c
URL: https://github.com/llvm/llvm-project/commit/8519d4fda1a186176805666c1b53ae7566f24b0c
DIFF: https://github.com/llvm/llvm-project/commit/8519d4fda1a186176805666c1b53ae7566f24b0c.diff
LOG: [NFC][hwasan] Add access_size into base report (#66682)
Added:
Modified:
compiler-rt/lib/hwasan/hwasan_report.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 8e376447623972e..d889a7a7e7fdbcf 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -451,19 +451,21 @@ static uptr GetTopPc(StackTrace *stack) {
namespace {
class BaseReport {
public:
- BaseReport(StackTrace *stack, bool fatal, uptr tagged_addr)
+ BaseReport(StackTrace *stack, bool fatal, uptr tagged_addr, uptr access_size = 0)
: scoped_report(fatal),
stack(stack),
tagged_addr(tagged_addr),
+ access_size(access_size),
untagged_addr(UntagAddr(tagged_addr)),
ptr_tag(GetTagFromPointer(tagged_addr)) {}
protected:
ScopedReport scoped_report;
- StackTrace *stack;
- uptr tagged_addr;
- uptr untagged_addr;
- tag_t ptr_tag;
+ StackTrace *stack = nullptr;
+ uptr tagged_addr = 0;
+ uptr access_size = 0;
+ uptr untagged_addr = 0;
+ tag_t ptr_tag = 0;
};
static void PrintAddressDescription(
@@ -739,7 +741,7 @@ class TagMismatchReport : public BaseReport {
explicit TagMismatchReport(StackTrace *stack, uptr tagged_addr,
uptr access_size, bool is_store, bool fatal,
uptr *registers_frame)
- : BaseReport(stack, fatal, tagged_addr),
+ : BaseReport(stack, fatal, tagged_addr, access_size),
access_size(access_size),
is_store(is_store),
registers_frame(registers_frame) {}
More information about the llvm-commits
mailing list