[PATCH] D91392: [hwasan] Fix Thread reuse (try 2).
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 17:40:44 PST 2020
eugenis added inline comments.
================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:115
+ if (t2 == t) {
+ live_list_.erase(&t2);
+ return;
----------------
vitalybuka wrote:
> eugenis wrote:
> > vitalybuka wrote:
> > > t2 = live_list_.back();
> > > live_list_.pop_back();
> > This would remove the last element, why?
> no, the last element in t2 position now.
> to avoid moving memory by live_list_.erase(&t2);
>
that's a really good idea, I can't believe I missed it
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