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

Philippe Daouadi via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 08:30:32 PDT 2016


blastrock created this revision.
blastrock added a reviewer: kcc.
blastrock added a subscriber: llvm-commits.
Herald added a subscriber: kubabrecka.

This patch adds the __asan_enter_fiber and __asan_exit_fiber methods
inspired from what can be found here
https://github.com/facebook/folly/commit/2ea64dd24946cbc9f3f4ac3f6c6b98a486c56e73 .
These methods are needed when the compiled software needs to implement
coroutines, fibers or the like. When the program jumps to a stack that is not
the thread stack, __asan_handle_no_return shows a warning about that.

I have very little knowledge about how asan works, but this seems to fix the
warning and the false positives I was getting. I am not sure this code actually
does what it must do, please tell me if I have overlooked something.

http://reviews.llvm.org/D20913

Files:
  lib/asan/asan_interface_internal.h
  lib/asan/asan_thread.cc
  lib/asan/asan_thread.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20913.59384.patch
Type: text/x-patch
Size: 3498 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160602/76b30d91/attachment.bin>


More information about the llvm-commits mailing list