-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Avoid heap allocation when truncating thread names #105239
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @cuviper |
7b2d28d
to
900ef70
Compare
fd35f66
to
497eabf
Compare
Ensure that heap allocation does not occur in a thread until std::thread is ready. This fixes issues with custom allocators that call std::thread::current(), since doing so prematurely initializes THREAD_INFO and causes the following thread_info::set() to fail.
497eabf
to
3c55af5
Compare
@bors r+ |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#104460 (Migrate parts of `rustc_expand` to session diagnostics) - rust-lang#105192 (Point at LHS on binop type err if relevant) - rust-lang#105234 (Remove unneeded field from `SwitchTargets`) - rust-lang#105239 (Avoid heap allocation when truncating thread names) - rust-lang#105410 (Consider `parent_count` for const param defaults) - rust-lang#105482 (Fix invalid codegen during debuginfo lowering) Failed merges: - rust-lang#105411 (Introduce `with_forced_trimmed_paths`) r? `@ghost` `@rustbot` modify labels: rollup
Ensure that heap allocation does not occur in a thread until
std::thread
is ready. This fixes issues with custom allocators that callstd::thread::current()
, since doing so prematurely initializesTHREAD_INFO
and causes the followingthread_info::set()
to fail.