[compiler-rt] 78faca3 - [NFC][hwasan] Add SANITIZER_GUARDED_BY to a variable
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 23:28:01 PDT 2023
Author: Vitaly Buka
Date: 2023-09-15T23:27:45-07:00
New Revision: 78faca3a11c205080beaea9cca16a65f033a79c5
URL: https://github.com/llvm/llvm-project/commit/78faca3a11c205080beaea9cca16a65f033a79c5
DIFF: https://github.com/llvm/llvm-project/commit/78faca3a11c205080beaea9cca16a65f033a79c5.diff
LOG: [NFC][hwasan] Add SANITIZER_GUARDED_BY to a variable
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 483f5b6ed59ea8a..803987a43a51369 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -82,13 +82,14 @@ class ScopedReport {
InternalMmapVector<char> error_message_;
bool fatal;
- static InternalMmapVector<char> *error_message_ptr_;
static Mutex error_message_lock_;
+ static InternalMmapVector<char> *error_message_ptr_
+ SANITIZER_GUARDED_BY(error_message_lock_);
static void (*error_report_callback_)(const char *);
};
-InternalMmapVector<char> *ScopedReport::error_message_ptr_;
Mutex ScopedReport::error_message_lock_;
+InternalMmapVector<char> *ScopedReport::error_message_ptr_;
void (*ScopedReport::error_report_callback_)(const char *);
// If there is an active ScopedReport, append to its error message.
More information about the llvm-commits
mailing list