mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
9f91c5099f
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. |
||
---|---|---|
.. | ||
on-broken-pipe | ||
atomic-print.rs | ||
backtrace-debuginfo-aux.rs | ||
backtrace-debuginfo.rs | ||
native-print-no-runtime.rs | ||
out-of-stack.rs | ||
rt-explody-panic-payloads.rs | ||
running-with-no-runtime.rs | ||
signal-alternate-stack-cleanup.rs | ||
stdout-before-main.rs | ||
stdout-before-main.run.stdout | ||
stdout-during-shutdown-unix.rs | ||
stdout-during-shutdown-unix.run.stdout | ||
stdout-during-shutdown-windows.rs | ||
stdout-during-shutdown-windows.run.stdout |