[PATCH] D72115: [TSan] Remove side effects from ThreadTid

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 10:05:30 PST 2020


yln abandoned this revision.
yln added a comment.

Thanks for pointing this out, Dmitry!  I have found your explanation:
https://github.com/llvm-mirror/compiler-rt/commit/411b2c9d6787b64939fc15fdeec65e9d65ba1a51
https://reviews.llvm.org/D54521#1305021

> What is the problem you are trying to solve?

I am trying to look up a thread by its `user_id` (pthread_t).

More context:
The normal way we make TSan aware of threads is `CreateThread`/`StartThread` in `pthread_create` interceptor/`__tsan_thread_start_func` on parent/child thread with some synchronization between them.  On Darwin, we have some special threads that are not created via `pthread_create` and I can't intercept their creation.  Is there a way to ask (from the context of the running thread) "Hey TSan, do you know about me?"  Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72115





More information about the llvm-commits mailing list