[compiler-rt] b7cc401 - [hwasan] Call user provided callback function for both fatal and non-… (#80429)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 17:10:28 PST 2024
Author: Enna1
Date: 2024-02-10T09:10:24+08:00
New Revision: b7cc401df5ac714f5de0cbc64e6c7083d2c1d712
URL: https://github.com/llvm/llvm-project/commit/b7cc401df5ac714f5de0cbc64e6c7083d2c1d712
DIFF: https://github.com/llvm/llvm-project/commit/b7cc401df5ac714f5de0cbc64e6c7083d2c1d712.diff
LOG: [hwasan] Call user provided callback function for both fatal and non-… (#80429)
…fatal error report
This makes the behavior of HWASan matching with ASan: always call user
provided callback function for an error report, but only call
`SetAbortMessage()` on Android when `flags()->halt_on_error` is true.
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 c3d260d1a61fa2..d3398ff004e20a 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