[PATCH] D71719: [scudo][standalone] Implement TSD registry disabling

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 11:33:08 PST 2019


cryptoad marked an inline comment as done.
cryptoad added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/tsd_exclusive.h:51
   ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) {
-    if (LIKELY(State == ThreadState::Initialized)) {
+    if (LIKELY(State == ThreadState::Initialized && !Disabled)) {
       *UnlockRequired = false;
----------------
eugenis wrote:
> is not this a data race?
I think it's OK for allocations to succeed until `disable()` returns, which I assume is the racey part you are referring to?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71719/new/

https://reviews.llvm.org/D71719





More information about the llvm-commits mailing list