[PATCH] D54664: [tsan] Add __cxa_guard_acquire hooks to support cooperative scheduling

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 17 09:29:32 PST 2018


dvyukov added inline comments.


================
Comment at: compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:880
+  OnCxaGuardAcquireEnter();
+  auto on_exit = at_scope_exit(&OnCxaGuardAcquireExit);
   for (;;) {
----------------
dvyukov wrote:
> For my education, why can't at_scope_exit call the function 2 or 3 times? Can't it create 2 or 3 copies of RunOnDestruction, each of which will call the function?
Don't we need to define move constructor for RunOnDestruction, delete copy constructor and all that stuff?


Repository:
  rL LLVM

https://reviews.llvm.org/D54664





More information about the llvm-commits mailing list