[PATCH] D54889: Fiber support for thread sanitizer

Dmitry Vyukov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 07:32:51 PST 2018


dvyukov added inline comments.


================
Comment at: lib/tsan/rtl/tsan_rtl.h:885
+void FiberDestroy(ThreadState *fiber, uptr pc);
+void FiberSwitch(ThreadState *fiber, unsigned flags, uptr pc);
+
----------------
It seems it should be `SwtchFiberFlags flags`. Or why do we need SwtchFiberFlags?


================
Comment at: lib/tsan/rtl/tsan_rtl_thread.cc:417
+ThreadState *FiberCreate(unsigned flags, uptr pc) {
+  ThreadState *thr = cur_thread();
+  void *mem = internal_alloc(MBlockThreadContex, sizeof(ThreadState));
----------------
This code is an abstract core and must not use cur_thread.
Pass `ThreadState *thr, uptr pc` as first args to all these functions as all runtime functions do.



Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D54889





More information about the llvm-commits mailing list