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

Philippe Daouadi via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 13:53:29 PDT 2016


blastrock updated this revision to Diff 59674.
blastrock added a comment.

Ok, I think I did everything you asked for, except for the interception of the swapcontext calls, I will come back at it later.

I didn't do anything on MsanThread, should I do something on it, for the case where the only reference left to the fiber stack is the sp register?

I am still unsure about something... There is that function AsanThread::ClearShadowForThreadAndStackTLS which does something about (un?)poisoning the stack. I didn't change it, so it still operates on the thread main stack for the moment, should it be changed to also clear the fiber stack if there is one?

I have added a few NOLINT there because the linter complained about the fact that a semicolon is useless after a closing brace. Any idea about how to avoid that warning is welcome.

And one last thing, I only ran the tests on clang 3.8 and rebased the patch on trunk to submit it here. I will run the tests later on trunk if everybody is ok with this code.


http://reviews.llvm.org/D20913

Files:
  include/sanitizer/common_interface_defs.h
  lib/asan/asan_thread.cc
  lib/asan/asan_thread.h
  test/asan/TestCases/Linux/swapcontext_test.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20913.59674.patch
Type: text/x-patch
Size: 8669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160605/2d4a7e1e/attachment.bin>


More information about the llvm-commits mailing list