Skip to content

Commit

Permalink
Raise stack size for tests in debug mode
Browse files Browse the repository at this point in the history
`cargo test --all-features` has been overflowing the previous stack size.
  • Loading branch information
dtolnay committed Apr 19, 2024
1 parent a9057f7 commit 76beaff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn abort_after() -> usize {
pub fn rayon_init() {
let stack_size = match env::var("RUST_MIN_STACK") {
Ok(s) => s.parse().expect("failed to parse RUST_MIN_STACK"),
Err(_) => 20 * 1024 * 1024,
Err(_) => 1024 * 1024 * if cfg!(debug_assertions) { 40 } else { 20 },
};
ThreadPoolBuilder::new()
.stack_size(stack_size)
Expand Down

0 comments on commit 76beaff

Please sign in to comment.