[compiler-rt] [scudo] Add two missing locks to enable/disable. (PR #79670)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 18:02:03 PST 2024


================
@@ -168,6 +168,14 @@ class BufferPool {
     return Buf.BufferIndex != StaticBufferCount;
   }
 
+  void disable() NO_THREAD_SAFETY_ANALYSIS {
+    Mutex.lock();
+  }
+
+  void enable() NO_THREAD_SAFETY_ANALYSIS {
+    Mutex.unlock();
+  }
+
----------------
ChiaHungDuan wrote:

I think we don't need the disable()/enable() here and RegionPageMap down below. They are utility data structures (the lock is to guard the static storage)

https://github.com/llvm/llvm-project/pull/79670


More information about the llvm-commits mailing list