Skip to content

change DEFAULT_STACK_SIZE to be 32MB on s390x - #161767

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fneddy:fix_stack_size_s390x
Sep 1, 2026
Merged

change DEFAULT_STACK_SIZE to be 32MB on s390x#161767
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fneddy:fix_stack_size_s390x

Conversation

@fneddy

@fneddy fneddy commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

tests/ui/match/match-stack-overflow-72933-.rs crashes on s390x due to hitting stack_size limit(#161742).
changing the size to 32MB on s390x fixes the crash.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 25, 2026
@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

r? @jackh726

rustbot has assigned @jackh726.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 75 candidates
  • Random selection from 16 candidates

@ChrisDenton

Copy link
Copy Markdown
Member

I'd rather we increased it for all (or most) platforms. Though does it need to be 32MB? There's no real reason to keep going up in powers of two, although having some leeway is useful.

Maybe we could keep the 16MB for 32-bit targets since those are more sensitive to thread stack sizes.

@fneddy

fneddy commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

ok i tested it. funny enough 17mb lets it pass. I guess setting it to 17mb for everybody wont hurt?

however i want to emphasize that some passes in rust are recursive and therefore one can always create a valid rust program that will segfault the compiler. indifferent of the architecture.

@ChrisDenton

Copy link
Copy Markdown
Member

Yeah, I don't really like tests that simply stress the recursion for no real reason. If someone has unusually extreme needs then that's what the environment variable is for (similarly, we have recursion_limit for some things). If however it is more representative of real world usage then we should absolute try to accommodate them by default.

tests/ui/match/match-stack-overflow-72933-.rs crashes on s390x due to
hitting stack_size limit. changing the size to 17MB  the crash.
@fneddy
fneddy force-pushed the fix_stack_size_s390x branch from 7fee27e to d3a3f13 Compare August 31, 2026 18:04
@ChrisDenton

Copy link
Copy Markdown
Member

LGTM, thanks! In the unlikely event this causes problems for anyone there's still plenty of time for this to be caught during nightly/beta.

@bors r+

@rust-bors

rust-bors Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d3a3f13 has been approved by ChrisDenton

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…isDenton

change DEFAULT_STACK_SIZE to be 32MB on s390x

`tests/ui/match/match-stack-overflow-72933-.rs` crashes on s390x due to hitting stack_size limit(rust-lang#161742).
changing the size to 32MB on s390x fixes the crash.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 1, 2026
…isDenton

change DEFAULT_STACK_SIZE to be 32MB on s390x

`tests/ui/match/match-stack-overflow-72933-.rs` crashes on s390x due to hitting stack_size limit(rust-lang#161742).
changing the size to 32MB on s390x fixes the crash.
rust-bors Bot pushed a commit that referenced this pull request Sep 1, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #151618 (rustdoc: add `--print` option)
 - #161287 (Update `icu_list` dependency to 2.3)
 - #161767 (change DEFAULT_STACK_SIZE to be 32MB on s390x)
 - #161968 (Diverse offload fixes)
 - #161971 (Remove -Zsaturating-float-casts flag)
 - #162071 (Fix ICE of getting item name from RPITIT)
 - #161209 (Rework `next_power_of_two` to always be `1 << …`)
 - #162073 (Change some `Infallible` to `!` in std)
 - #162086 (Remove `gate_check` from `AttributeStability::Unstable`)
 - #162102 (`alloc` crate: shrink undocumented `unsafe` blocks)
 - #162110 (make it clear that Range cannot represent arbitrary ranges)
@rust-bors
rust-bors Bot merged commit d02dac2 into rust-lang:main Sep 1, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 1, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 1, 2026
Rollup merge of #161767 - fneddy:fix_stack_size_s390x, r=ChrisDenton

change DEFAULT_STACK_SIZE to be 32MB on s390x

`tests/ui/match/match-stack-overflow-72933-.rs` crashes on s390x due to hitting stack_size limit(#161742).
changing the size to 32MB on s390x fixes the crash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants