[compiler-rt] [scudo] Add ScopedTSD to avoid releasing TSD manually (PR #80061)

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 11:03:57 PST 2024


================
@@ -129,31 +126,33 @@ static std::mutex Mutex;
 static std::condition_variable Cv;
 static bool Ready;
 
-template <typename AllocatorT> static void stressCache(AllocatorT *Allocator) {
+// Accessing `TSD->getCache()` requires `TSD::Mutex` and which doesn't have easy
----------------
cferris1000 wrote:

Same as the comment, something like:

requires TSD::Mutex which isn't easy to test using thread-safety analysis.

Is less awkward.

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


More information about the llvm-commits mailing list