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

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 06:08:13 PDT 2016


dvyukov added a comment.

> Is there a way from an AsanThread to get its stack pointer? It would help to know if the thread is on one stack or the other for all usages of stack_*() and solve all these problems.


You generally can do that by taking an address of any local variable.
Yes, if we are in the middle of switch we can take current SP and figure out what stack we are on. I have not looked at all usages of stack_top, but it seems to me that AddrIsInStack should use this new fiber support as well. Kostya, what do you think?


http://reviews.llvm.org/D20913





More information about the llvm-commits mailing list