[compiler-rt] [scudo] Lock/unlock MutexTSDs in disable/enable. (PR #169440)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 13:19:39 PST 2025


================
@@ -93,13 +93,15 @@ struct TSDRegistrySharedT {
 
   void disable() NO_THREAD_SAFETY_ANALYSIS {
     Mutex.lock();
+    MutexTSDs.lock();
----------------
cferris1000 wrote:

I feel like this might confuse people since Mutex and MutexTSDs are not really related. Looking at this more closely, I'm not sure we really need both Mutexes since one is only used for initialization and the other used for the TSD access. I don't want to make that change in this pull request though. But I'm going to look at a follow-on that removes Mutex completely. If there is a reason to keep them separate, let me know.

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


More information about the llvm-commits mailing list