Merge pull request #2617 from alexcrichton/limit-tables-and-memeories

Add knobs to limit memories/tables in a `Store`
This commit is contained in:
Nick Fitzgerald
2021-01-28 10:20:33 -08:00
committed by GitHub
7 changed files with 151 additions and 9 deletions

View File

@@ -100,6 +100,9 @@ pub fn instantiate_with_config(
Ok(_) => {}
// Allow traps which can happen normally with `unreachable`
Err(e) if e.downcast_ref::<Trap>().is_some() => {}
// Allow resource exhaustion since this is something that our wasm-smith
// generator doesn't guarantee is forbidden.
Err(e) if e.to_string().contains("resource limit exceeded") => {}
Err(e) => panic!("failed to instantiate {}", e),
}
}