[compiler-rt] [hwasan] Call user provided callback function for both fatal and non-… (PR #80429)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 05:03:59 PST 2024


https://github.com/Enna1 created https://github.com/llvm/llvm-project/pull/80429

…fatal error report



>From 3c457aed165f5db1faf7220abef8fbe9b4143793 Mon Sep 17 00:00:00 2001
From: "xumingjie.enna1" <xumingjie.enna1 at bytedance.com>
Date: Fri, 2 Feb 2024 21:01:33 +0800
Subject: [PATCH] [hwasan] Call user provided callback function for both fatal
 and non-fatal error report

---
 compiler-rt/lib/hwasan/hwasan_report.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 12a4fa47f2151..54bf8247ceeb3 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -40,7 +40,7 @@ class ScopedReport {
  public:
   explicit ScopedReport(bool fatal) : fatal(fatal) {
     Lock lock(&error_message_lock_);
-    error_message_ptr_ = fatal ? &error_message_ : nullptr;
+    error_message_ptr_ = &error_message_;
     ++hwasan_report_count;
   }
 



More information about the llvm-commits mailing list