Skip to content

fix: Double stack size for threads to 16MiB - #22956

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
ChayimFriedman2:big-stack
Jul 31, 2026
Merged

fix: Double stack size for threads to 16MiB#22956
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
ChayimFriedman2:big-stack

Conversation

@ChayimFriedman2

Copy link
Copy Markdown
Contributor

This does not impact memory usage since this is only reserved, not committed, memory; it could crash if we allocate more than the commit limit and overcommit is disabled but for such small numbers it practically can't happen.

This is an alternative to using stacker to grow the stack on-demand; rustc is transitioning to the same model - rust-lang/compiler-team#1011.

16MiB was chosen because when that was chosen as the limit in rustc (rust-lang/rust#158759), crater succeeded for practically all crates, so it should be enough for us as well. It's also two times the current number (8MiB) which is a lot.

Closes #22740.
Closes #9824.
Should fix #22374, unless we need an even bigger number.
Maybe fixes #15873.
Probably fixes #20127.

This does not impact memory usage since this is only reserved, not committed, memory; it could crash if we allocate more than the commit limit and overcommit is disabled but for such small numbers it practically can't happen.

This is an alternative to using `stacker` to grow the stack on-demand; rustc is transitioning to the same model - rust-lang/compiler-team#1011.

16MiB was chosen because when that was chosen as the limit in rustc (rust-lang/rust#158759), crater succeeded for practically all crates, so it should be enough for us as well. It's also two times the current number (8MiB) which is a lot.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2026
@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Jul 31, 2026
Merged via the queue into rust-lang:master with commit e4e6733 Jul 31, 2026
18 checks passed
@ChayimFriedman2
ChayimFriedman2 deleted the big-stack branch July 31, 2026 14:59
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants