rust/tests/ui/runtime
joboet 9f91c5099f
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.
2024-10-12 13:01:36 +02:00
..
on-broken-pipe
atomic-print.rs
backtrace-debuginfo-aux.rs
backtrace-debuginfo.rs
native-print-no-runtime.rs
out-of-stack.rs Disable stack overflow handler tests on iOS-like platforms 2024-05-28 12:31:12 +02:00
rt-explody-panic-payloads.rs
running-with-no-runtime.rs
signal-alternate-stack-cleanup.rs
stdout-before-main.rs std: fix stdout-before-main 2024-10-12 13:01:36 +02:00
stdout-before-main.run.stdout std: fix stdout-before-main 2024-10-12 13:01:36 +02:00
stdout-during-shutdown-unix.rs
stdout-during-shutdown-unix.run.stdout
stdout-during-shutdown-windows.rs
stdout-during-shutdown-windows.run.stdout