-
Notifications
You must be signed in to change notification settings - Fork 13.6k
thread name in stack overflow message #144500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review here isn't worth very much, but from what I do know this looks great. Thank you so much for fixing this so quickly, @joboet!
This looks fair enough as a quick fix. @bors r+ |
… r=ChrisDenton thread name in stack overflow message Fixes rust-lang#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 rust-lang#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
@rust-lang/libs we're nearing a release so it'd be good to have a backport decision asap. |
Rollup of 10 pull requests Successful merges: - #144359 (add codegen test for variadics) - #144409 (Stop compilation early if macro expansion failed) - #144422 (library/windows_targets: Fix macro expansion error in 'link' macro) - #144430 (tests: aarch64-outline-atomics: Remove hardcoded target) - #144445 (Fix `./x check bootstrap` (again)) - #144453 (canonicalize build root in `tests/run-make/linker-warning`) - #144454 (move uefi test to run-make) - #144464 (Only run bootstrap tests in `x test` on CI) - #144495 (bump cargo_metadata) - #144500 (thread name in stack overflow message) r? `@ghost` `@rustbot` modify labels: rollup
Looks like there's an alternative implementation of rust/library/std/src/sys/pal/wasi/thread.rs Lines 123 to 125 in dccafab
|
dccafab
to
73751a0
Compare
Fixes #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 #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