rust/library/std/src/thread
Stuart Cook 4bfbd80bab
Rollup merge of #144500 - joboet:thread-name-stack-overflow, r=ChrisDenton
thread name in stack overflow message

Fixes rust-lang/rust#144481, which is caused by the thread name not being initialised yet when setting up the stack overflow information. Unfortunately, the stack overflow UI test did not test for the correct thread name being present, and testing this separately didn't occur to me when writing https://github.com/rust-lang/rust/pull/140628.

This PR contains the smallest possible fix I could think of: passing the thread name explicitly to the platform thread creation function. In the future I'd very much like to explore some possibilities around merging the thread packet and thread handle into one structure and using that in the platform code instead – but that's best left for another PR.

This PR also amends the stack overflow test to check for thread names, so we don't run into this again.

``@rustbot`` label +beta-nominated
2025-07-29 20:19:51 +10:00
..
current.rs add comments explaining main thread identification 2025-01-14 13:37:28 +01:00
local.rs Add LocalKey<Cell>::update 2025-07-15 16:17:57 -05:00
mod.rs Rollup merge of #144500 - joboet:thread-name-stack-overflow, r=ChrisDenton 2025-07-29 20:19:51 +10:00
scoped.rs use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
spawnhook.rs setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
tests.rs Mark some std tests as requiring panic = "unwind" 2025-03-10 08:31:06 -07:00