[PATCH] D91392: [hwasan] Fix Thread reuse (try 2).

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 16:04:35 PST 2020


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:113
+  void RemoveThreadFromLiveList(Thread *t) {
+    for (Thread *&t2 : live_list_)
+      if (t2 == t) {
----------------
maybe you can just flip some the t->dead = true
and do some garbage collection when e.g. live_list_ contains 50% of dead?



================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:115
+      if (t2 == t) {
+        live_list_.erase(&t2);
+        return;
----------------
t2 = live_list_.back();
live_list_.pop_back();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91392



More information about the llvm-commits mailing list