[PATCH] D20913: [asan] add primitives that allow coroutine implementations
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 15:46:28 PDT 2016
kcc added a reviewer: dvyukov.
kcc added a comment.
Please add test(s)
The code looks sane but I don't know enough about fibers to see what may go wrong.
Anyone?
================
Comment at: lib/asan/asan_thread.cc:365
@@ +364,3 @@
+
+void NOINLINE __asan_enter_fiber(const void *stack_top,
+ const void *stack_bottom) {
----------------
Is this going to be public interface that we want to allow users to call?
If yes, it should be __sanitizer_enter_fiber and *also* declared in include/sanitizer/common_interface_defs.h
(It's ok if we only implement it in asan for now, just explain it in comments in common_interface_defs.h)
================
Comment at: lib/asan/asan_thread.h:104
@@ +103,3 @@
+ if (bottom > top)
+ Report("WARNING: __asan_enter_fiber called with inverted stack\n");
+ if (fiber_stack_top_ || fiber_stack_bottom_ || fiber_stack_size_)
----------------
should this be a hard failure?
================
Comment at: lib/asan/asan_thread.h:159
@@ +158,3 @@
+ uptr fiber_stack_bottom_;
+ uptr fiber_stack_size_;
+
----------------
Why do you need this as a variable? Isn't a function better?
http://reviews.llvm.org/D20913
More information about the llvm-commits
mailing list