Skip to content
Commit f9a706a3 authored by Julian Lettner's avatar Julian Lettner
Browse files

[TSan][Darwin] Avoid calling pthread_self() before libpthread is initialized

This skips calling `pthread_self` when `main_thread_identity` hasn't
been initialized yet.  `main_thread_identity` is only ever assigned in
`__tsan::InitializePlatform`.  This change should be relatively safe; we
are not changing behavior other than skipping the call to `pthread_self`
when `main_thread_identity == 0`.

rdar://57822138

Reviewed By: kubamracek

Differential Revision: https://reviews.llvm.org/D71559
parent 803403af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment