[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:04:30 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Enna1 (Enna1)

<details>
<summary>Changes</summary>

…fatal error report



---
Full diff: https://github.com/llvm/llvm-project/pull/80429.diff


1 Files Affected:

- (modified) compiler-rt/lib/hwasan/hwasan_report.cpp (+1-1) 


``````````diff
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;
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list