[PATCH] D20913: [asan] add primitives that allow coroutine implementations

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 03:54:56 PDT 2016


dvyukov added inline comments.

================
Comment at: lib/asan/asan_thread.cc:136
@@ +135,3 @@
+      return StackBounds{fiber_stack_bottom_, fiber_stack_top_}; // NOLINT
+    if (cur_stack >= stack_bottom_ && cur_stack < stack_top_)
+      return StackBounds{stack_bottom_, stack_top_}; // NOLINT
----------------
This if is excessive. Remove.

================
Comment at: lib/asan/asan_thread.h:97
@@ +96,3 @@
+  void StartEnterFiber(uptr bottom, uptr size) {
+    fiber_stack_bottom_ = bottom;
+    fiber_stack_top_ = bottom + size;
----------------
We can also switch from one fiber to another. So we need two fiber stacks (old/new).


http://reviews.llvm.org/D20913





More information about the llvm-commits mailing list