diff options
author | Julian Lettner <julian.lettner@apple.com> | 2019-12-12 11:51:55 -0800 |
---|---|---|
committer | Julian Lettner <julian.lettner@apple.com> | 2019-12-16 13:10:51 -0800 |
commit | f9a706a36ae5dcb87b0b6649d0c80e989400f48e (patch) | |
tree | 16e036a848c2fef7ef9c45466b884ec6dbe090e2 /clang/lib/Analysis/CodeInjector.cpp | |
parent | 803403afc83f659be1c620eb1896dcf704b18b0a (diff) | |
download | bcm5719-llvm-f9a706a36ae5dcb87b0b6649d0c80e989400f48e.tar.gz bcm5719-llvm-f9a706a36ae5dcb87b0b6649d0c80e989400f48e.zip |
[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
Diffstat (limited to 'clang/lib/Analysis/CodeInjector.cpp')
0 files changed, 0 insertions, 0 deletions