[PATCH] D19722: [sanitizer] Don't reuse the main thread in ThreadRegistry

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 02:53:32 PDT 2016


kubabrecka added a comment.

In http://reviews.llvm.org/D19722#418402, @dvyukov wrote:

> No, it is not OK. How does the look like?
>  Note to get thread id reuse, you don't need to use GCD worker threads, you can create 16 normal threads, ensure that they started and join them.


The crash only happens when the main thread is reused as a worker thread.  It's hard to trigger that, since you can't control the creation and termination of worker threads.  I don't know how would throwing in some regular pthreads help.


http://reviews.llvm.org/D19722





More information about the llvm-commits mailing list