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

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 03:04:54 PDT 2016


dvyukov added a comment.

> So you mean redefining makecontext and swapcontext in compiler-rt, annotate them and call libc's implementation after that? Is there an example of such a code for another api?


Yes.
Here are examples (the interceptors should also be added to that file):
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?revision=270076&view=markup

You will need to define new hooks COMMON_INTERCEPTOR_ENTER/EXIT_FIBER, but then you can give them actual implementation only in asan (for starters).


http://reviews.llvm.org/D20913





More information about the llvm-commits mailing list