-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Raise DEFAULT_MIN_STACK_SIZE
to at least 64KiB
#126059
Conversation
Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB. Two platforms "affected" by this have no actual threads: - UEFI - "unsupported" Platforms that this actually affects: - wasm32-wasi with "atomics" enabled - wasm32-wasi-p1-threads Two exceptions: - SGX: a "secure code execution" platform, stays at 4096B - TEEOS: also a "secure code execution" platform, stays at 8192B I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect.
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
OpenBSD 4.6 was a long while ago, so 128KiB might make more sense (the Alpine minimum, also used in this repo by Xous and ITRON). |
This sounds great to me and I don't see a need to keep such a small default but cc @alexcrichton in case I'm missing something? |
Definitely no reason for WASI to be so small. I've no recollection myself of the provenance of the current value and digging through the history it seems like it's just a bunch of historical accidents that led to this. Stacks in wasi should definitely be ok to be larger than 4k, and 4k is indeed overly small. Thanks for the PR to raise it @workingjubilee! |
Great! Then let's do this... @bors r+ rollup |
…r, r=ChrisDenton Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB. Two platforms "affected" by this have no actual threads: - UEFI - "unsupported" Platforms that this actually affects: - wasm32-wasi with "atomics" enabled - wasm32-wasi-p1-threads Two exceptions: - SGX: a "secure code execution" platform, stays at 4096B - TEEOS: also a "secure code execution" platform, stays at 8192B I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect. Fixes rust-lang#126027 which is a bug report about `DEFAULT_MIN_STACK_SIZE` being too low on wasi.
…r, r=ChrisDenton Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB. Two platforms "affected" by this have no actual threads: - UEFI - "unsupported" Platforms that this actually affects: - wasm32-wasi with "atomics" enabled - wasm32-wasi-p1-threads Two exceptions: - SGX: a "secure code execution" platform, stays at 4096B - TEEOS: also a "secure code execution" platform, stays at 8192B I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect. Fixes rust-lang#126027 which is a bug report about `DEFAULT_MIN_STACK_SIZE` being too low on wasi.
…kingjubilee Rollup of 12 pull requests Successful merges: - rust-lang#125220 (Repair several `riscv64gc-unknown-linux-gnu` codegen tests) - rust-lang#126033 (CI: fix publishing of toolstate history) - rust-lang#126034 (Clarify our tier 1 Windows Server support) - rust-lang#126035 (Some minor query system cleanups) - rust-lang#126051 (Clarify an `x fmt` error.) - rust-lang#126059 (Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB) - rust-lang#126064 (Migrate `run-make/manual-crate-name` to `rmake.rs`) - rust-lang#126072 (compiletest: Allow multiple `//@ run-flags:` headers) - rust-lang#126073 (Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps) - rust-lang#126081 (Do not use relative paths to Rust source root in run-make tests) - rust-lang#126086 (use windows compatible executable name for libcxx-version) - rust-lang#126096 ([RFC-2011] Allow `core_intrinsics` when activated) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#126059 - workingjubilee:stack-nothing-higher, r=ChrisDenton Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB. Two platforms "affected" by this have no actual threads: - UEFI - "unsupported" Platforms that this actually affects: - wasm32-wasi with "atomics" enabled - wasm32-wasi-p1-threads Two exceptions: - SGX: a "secure code execution" platform, stays at 4096B - TEEOS: also a "secure code execution" platform, stays at 8192B I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect. Fixes rust-lang#126027 which is a bug report about `DEFAULT_MIN_STACK_SIZE` being too low on wasi.
Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising
DEFAULT_MIN_STACK_SIZE
from 4096 bytes to at least 64KiB.Two platforms "affected" by this have no actual threads:
Platforms that this actually affects:
Two exceptions:
I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect.
Fixes #126027 which is a bug report about
DEFAULT_MIN_STACK_SIZE
being too low on wasi.