[PATCH] D20913: [asan] add primitives that allow coroutine implementations
Philippe Daouadi via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 13:24:55 PDT 2016
blastrock updated this revision to Diff 60593.
blastrock marked an inline comment as done.
blastrock added a comment.
Here's what's new:
- replaced warnings by asserts when calling start/finish_switch_fiber in wrong order
- simplified code with only one atomic as suggested by @dvyukov
- clang-formatted the two test files
- removed the useless x/s argument from the test, the signal now always triggers
- replaced ThrowAndCatch by a call to a noreturn function that will longjmp back
- replaced some exit(0) by exit(1) in the test
- loop 30 times instead of doing a single run
A few points that need checking:
- I added some atomic_load()s because of the bool that was changed to atomic, I choose a relaxed memory order there, I think it is enough.
- I didn't use an atomic<int> but atomic_uint8_t to save some space, it shouldn't be harmful.
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_annotation.cc
test/asan/TestCases/Linux/swapcontext_use_after_return.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20913.60593.patch
Type: text/x-patch
Size: 16958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160613/b9095730/attachment.bin>
More information about the llvm-commits
mailing list