Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/wasmtime/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ impl Config {
bail!("feature 'threads' requires 'bulk_memory' to be enabled");
}
#[cfg(feature = "async")]
if self.max_wasm_stack > self.async_stack_size {
if self.async_support && self.max_wasm_stack > self.async_stack_size {
bail!("max_wasm_stack size cannot exceed the async_stack_size");
}
if self.max_wasm_stack == 0 {
Expand Down
10 changes: 10 additions & 0 deletions tests/all/traps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,3 +1643,13 @@ fn same_module_multiple_stores() -> Result<()> {

Ok(())
}

#[test]
fn async_stack_size_ignored_if_disabled() -> Result<()> {
let mut config = Config::new();
config.async_support(false);
config.max_wasm_stack(8 << 20);
Engine::new(&config)?;

Ok(())
}