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

Philippe Daouadi via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 08:14:30 PDT 2016


blastrock marked 6 inline comments as done.

================
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
----------------
dvyukov wrote:
> This if is excessive. Remove.
Right, I changed this code so much I missed the obvious :P

================
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;
----------------
dvyukov wrote:
> We can also switch from one fiber to another. So we need two fiber stacks (old/new).
Indeed, this is not enough, I will fix it and add tests.


http://reviews.llvm.org/D20913





More information about the llvm-commits mailing list