[PATCH] D54889: Fiber support for thread sanitizer

Yuri Per via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 05:21:43 PST 2018


yuri added a comment.

In D54889#1309474 <https://reviews.llvm.org/D54889#1309474>, @dvyukov wrote:

> It's unclear how this is supposed to be used. I would expect to see an interceptor for swapcontext that will make use of this, but there is none...


Interceptor for swapcontext without additional sanitizer API is not enough because it is not known when context is created and destroyed. Actually, I am not sure if swapcontext is actually used by someone because it is slow and has strange limitations.

My interface assumes is that users should call __tsan_switch_to_fiber() immediately before switching context and then call swapcontext or whatever he want to perform actual switch.

> If these annotations are supposed to be user callable (are they? why?), we also need interface declarations in:
>  https://github.com/llvm-mirror/compiler-rt/blob/master/include/sanitizer/tsan_interface.h

Interface change is already present in diff.

> We also need tests (lots) that demonstrate how this can be used and that this works.

OK, I will work on it and add some tests.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54889/new/

https://reviews.llvm.org/D54889





More information about the llvm-commits mailing list