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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 12:13:40 PST 2019


eugenis added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/tsd_shared.h:83
+      TSDs[I].unlock();
+  }
+
----------------
I'm also concerned about the shared tsd code path. Is locking the tsd enough to ensure that no allocations will happen in the future? It looks like threads hold the tsd lock for as short a time as possible, and do the rest of the work such as updating the chuck state later without synchronization. This work may not be finished by the time malloc_disable returns. Could malloc_iterate be confused if it sees the allocator in that state?


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