Setting a lower `RUST_MIN_STACK` than `DEFAULT_STACK_SIZE` increases stack???
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
While working on this issue #122357, I found that setting the RUST_MIN_STACK variable size to 7mb or more, the build is successful. But the default stack size in rust is 8mb. Why do we have to set RUST_MIN_STACK again for this to work?
Steps to create the example directory are in this link https://github.com/rust-lang/rust/issues/122357#issue-2180549643
To verify this please follow these steps.
- setup the example from above link.
- Run
cargo buildin the example, this time the build would fail. - Export
RUST_MIN_STACK=$((7*1024*1024)and runcargo buildagain. This time the build is successful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by following the example setup in issue #122357, then reproduce the failure with cargo build and compare it with the build after setting RUST_MIN_STACK to 7 MiB. Trace why the lower setting changes the result and document the cause or identify the required fix, with the original example building successfully as the completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100