diff options
| author | Trevor Gross <t.gross35@gmail.com> | 2024-10-12 11:08:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-12 11:08:43 -0500 |
| commit | ca3c822068c697c6c69d800f03b966c2153228b7 (patch) | |
| tree | 13c66768c1d6f260fcfe8c2fb05583dcbc274290 /compiler/rustc_codegen_llvm/src | |
| parent | 8a86f1dd8c56ffba8df909c84d1908fb462efeba (diff) | |
| parent | 9f91c5099fb7261cf8c85cc638d2692a317060ec (diff) | |
| download | rust-ca3c822068c697c6c69d800f03b966c2153228b7.tar.gz rust-ca3c822068c697c6c69d800f03b966c2153228b7.zip | |
Rollup merge of #131233 - joboet:stdout-before-main, r=tgross35
std: fix stdout-before-main Fixes #130210. Since #124881, `ReentrantLock` uses `ThreadId` to identify threads. This has the unfortunate consequence of breaking uses of `Stdout` before main: Locking the `ReentrantLock` that synchronizes the output will initialize the thread ID before the handle for the main thread is set in `rt::init`. But since that would overwrite the current thread ID, `thread::set_current` triggers an abort. This PR fixes the problem by using the already initialized thread ID for constructing the main thread handle and allowing `set_current` calls that do not change the thread's ID.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
