diff options
3 files changed, 7 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h index db52bf565a5..ab680b5e2d1 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_secondary.h @@ -314,6 +314,6 @@ class LargeMmapAllocator { struct Stats { uptr n_allocs, n_frees, currently_allocated, max_allocated, by_size_log[64]; } stats; - SpinMutex mutex_; + StaticSpinMutex mutex_; }; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h index 38b088b8446..76df3ed8de5 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator_stats.h @@ -101,7 +101,7 @@ class AllocatorGlobalStats : public AllocatorStats { } private: - mutable SpinMutex mu_; + mutable StaticSpinMutex mu_; }; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h b/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h index 886445a2732..d4aa12fbebc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h @@ -90,6 +90,9 @@ class Quarantine { atomic_store_relaxed(&max_size_, size); atomic_store_relaxed(&min_size_, size / 10 * 9); // 90% of max size. atomic_store_relaxed(&max_cache_size_, cache_size); + + cache_mutex_.Init(); + recycle_mutex_.Init(); } uptr GetSize() const { return atomic_load_relaxed(&max_size_); } @@ -142,8 +145,8 @@ class Quarantine { atomic_uintptr_t min_size_; atomic_uintptr_t max_cache_size_; char pad1_[kCacheLineSize]; - SpinMutex cache_mutex_; - SpinMutex recycle_mutex_; + StaticSpinMutex cache_mutex_; + StaticSpinMutex recycle_mutex_; Cache cache_; char pad2_[kCacheLineSize]; |