Skip to content

Commit 78faca3

Browse files
committed
[NFC][hwasan] Add SANITIZER_GUARDED_BY to a variable
1 parent ff8b4c8 commit 78faca3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler-rt/lib/hwasan/hwasan_report.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ class ScopedReport {
8282
InternalMmapVector<char> error_message_;
8383
bool fatal;
8484

85-
static InternalMmapVector<char> *error_message_ptr_;
8685
static Mutex error_message_lock_;
86+
static InternalMmapVector<char> *error_message_ptr_
87+
SANITIZER_GUARDED_BY(error_message_lock_);
8788
static void (*error_report_callback_)(const char *);
8889
};
8990

90-
InternalMmapVector<char> *ScopedReport::error_message_ptr_;
9191
Mutex ScopedReport::error_message_lock_;
92+
InternalMmapVector<char> *ScopedReport::error_message_ptr_;
9293
void (*ScopedReport::error_report_callback_)(const char *);
9394

9495
// If there is an active ScopedReport, append to its error message.

0 commit comments

Comments
 (0)