[NFC][sanitizer] Thread safety annotation for Symbolizer
This commit is contained in:
@@ -185,17 +185,17 @@ class Symbolizer final {
|
||||
class ModuleNameOwner {
|
||||
public:
|
||||
explicit ModuleNameOwner(Mutex *synchronized_by)
|
||||
: last_match_(nullptr), mu_(synchronized_by) {
|
||||
: mu_(synchronized_by), last_match_(nullptr) {
|
||||
storage_.reserve(kInitialCapacity);
|
||||
}
|
||||
const char *GetOwnedCopy(const char *str);
|
||||
|
||||
private:
|
||||
static const uptr kInitialCapacity = 1000;
|
||||
InternalMmapVector<const char*> storage_;
|
||||
const char *last_match_;
|
||||
|
||||
Mutex *mu_;
|
||||
const char *last_match_ SANITIZER_GUARDED_BY(mu_);
|
||||
InternalMmapVector<const char *> storage_ SANITIZER_GUARDED_BY(*mu_);
|
||||
} module_names_;
|
||||
|
||||
/// Platform-specific function for creating a Symbolizer object.
|
||||
@@ -220,7 +220,7 @@ class Symbolizer final {
|
||||
// always synchronized.
|
||||
Mutex mu_;
|
||||
|
||||
IntrusiveList<SymbolizerTool> tools_;
|
||||
IntrusiveList<SymbolizerTool> tools_ SANITIZER_GUARDED_BY(mu_);
|
||||
|
||||
explicit Symbolizer(IntrusiveList<SymbolizerTool> tools);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user