Raise DEFAULT_MIN_STACK_SIZE
to at least 64KiB · model-checking/verify-rust-std@051c6c6 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Commit 051c6c6
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.
File tree
4 files changed
lines changed
4 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -7,7 +7,7 @@ use crate::time::Duration; | ||
7 | 7 | |
8 | 8 | pub struct Thread(!); |
9 | 9 | |
10 | -pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; | |
10 | +pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024; | |
11 | 11 | |
12 | 12 | impl Thread { |
13 | 13 | // unsafe: see thread::Builder::spawn_unchecked for safety requirements |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,7 +6,7 @@ use crate::time::Duration; | ||
6 | 6 | |
7 | 7 | pub struct Thread(!); |
8 | 8 | |
9 | -pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; | |
9 | +pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024; | |
10 | 10 | |
11 | 11 | impl Thread { |
12 | 12 | // unsafe: see thread::Builder::spawn_unchecked for safety requirements |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -66,7 +66,7 @@ cfg_if::cfg_if! { | ||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | -pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; | |
69 | +pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024; | |
70 | 70 | |
71 | 71 | impl Thread { |
72 | 72 | // unsafe: see thread::Builder::spawn_unchecked for safety requirements |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -6,7 +6,7 @@ use crate::time::Duration; | ||
6 | 6 | |
7 | 7 | pub struct Thread(!); |
8 | 8 | |
9 | -pub const DEFAULT_MIN_STACK_SIZE: usize = 4096; | |
9 | +pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024; | |
10 | 10 | |
11 | 11 | impl Thread { |
12 | 12 | // unsafe: see thread::Builder::spawn_unchecked for safety requirements |