Skip to content

std: don't overflow when rounding up huge thread stack sizes on unix - #165746

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
programskillforverification:huge-thread-stack-size
Nov 11, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
programskillforverification:huge-thread-stack-size

Conversation

@programskillforverification

@programskillforverification programskillforverification commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This is a resubmission of #165703 by lazerg.

Fixes #165683

r? maxdexh

@rustbot

rustbot commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Any special-casing of Miri in the standard library requires review.

cc @rust-lang/miri

@rustbot rustbot added A-thread Area: `std::thread` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 10, 2026
@programskillforverification

Copy link
Copy Markdown
Contributor Author

@maxdexh shall we wait for #165117 to be merged?

@maxdexh

maxdexh commented Nov 10, 2026

Copy link
Copy Markdown
Member

Yes, let's wait for that

Comment thread library/std/src/thread/tests.rs Resolved
@maxdexh maxdexh added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Nov 10, 2026
@maxdexh

maxdexh commented Nov 11, 2026

Copy link
Copy Markdown
Member

the thing got merged

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Nov 11, 2026
@rustbot

rustbot commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@maxdexh

maxdexh commented Nov 11, 2026

Copy link
Copy Markdown
Member

You probably need to rebase this

@rustbot

rustbot commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@programskillforverification

Copy link
Copy Markdown
Contributor Author

@bors squash

@rust-bors

This comment has been minimized.

* std: don't overflow when rounding up huge thread stack sizes on unix
* Update library/std/src/thread/tests.rs

Co-authored-by: Joseph Zhao <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🔨 2 commits were squashed into a8afb0f.

@rust-bors
rust-bors Bot force-pushed the huge-thread-stack-size branch from 8517619 to a8afb0f Compare November 11, 2026 13:57
@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🔨 2 commits were squashed into a8afb0f.

@maxdexh maxdexh left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors

rust-bors Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit a8afb0f has been tentatively approved by maxdexh

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #165805 (Replace `match_span_kind` macro with `SpanKind`)
 - #165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - #165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - #165809 (Update to ar_archive_writer 0.5.5)
 - #165812 (Remove `-Z stack-protector=basic`)
 - #165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)
@rust-bors
rust-bors Bot merged commit 110137a into rust-lang:main Nov 11, 2026
14 checks passed
@rustbot rustbot added this to the 1.102.0 milestone Nov 11, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 11, 2026
Rollup merge of #165746 - programskillforverification:huge-thread-stack-size, r=maxdexh

std: don't overflow when rounding up huge thread stack sizes on unix

This is a resubmission of #165703 by lazerg.

Fixes #165683

r? maxdexh
yawnbo pushed a commit to yawnbo/rust that referenced this pull request Nov 16, 2026
…nathanBrouwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang#165805 (Replace `match_span_kind` macro with `SpanKind`)
 - rust-lang#165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - rust-lang#165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - rust-lang#165809 (Update to ar_archive_writer 0.5.5)
 - rust-lang#165812 (Remove `-Z stack-protector=basic`)
 - rust-lang#165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)

codegen: avoid CGU invalidation in path dependent debugger visualizer lookup
mehmettoplu-rs pushed a commit to mehmettoplu-rs/rustc_codegen_gcc that referenced this pull request Nov 22, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#165805 (Replace `match_span_kind` macro with `SpanKind`)
 - rust-lang/rust#165746 (std: don't overflow when rounding up huge thread stack sizes on unix)
 - rust-lang/rust#165807 (Fix 'simga' typo in char.to_lowercase documentation)
 - rust-lang/rust#165809 (Update to ar_archive_writer 0.5.5)
 - rust-lang/rust#165812 (Remove `-Z stack-protector=basic`)
 - rust-lang/rust#165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-thread Area: `std::thread` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

thread::Builder::stack_size(usize::MAX).spawn() panics with "attempt to add with overflow" on Apple targets

4 participants