Add a limits and trap-on-OOM options to the CLI (#6149)
* Add a limits and trap-on-OOM options to the CLI This commit adds new options to the `wasmtime` CLI to control the `Store::limiter` behavior at runtime. This enables artificially restriction the memory usage of the wasm instance, for example. Additionally a new option is added to `StoreLimits` to force a trap on growth failure. This is intended to help quickly debug modules with backtraces if OOM is happening, or even diagnosing if OOM is happening in the first place. * Fix compile of fuzzing oracle
This commit is contained in:
@@ -306,11 +306,16 @@ fn massive_64_bit_still_limited() -> Result<()> {
|
||||
_current: usize,
|
||||
_request: usize,
|
||||
_max: Option<usize>,
|
||||
) -> bool {
|
||||
) -> Result<bool> {
|
||||
self.hit = true;
|
||||
true
|
||||
Ok(true)
|
||||
}
|
||||
fn table_growing(&mut self, _current: u32, _request: u32, _max: Option<u32>) -> bool {
|
||||
fn table_growing(
|
||||
&mut self,
|
||||
_current: u32,
|
||||
_request: u32,
|
||||
_max: Option<u32>,
|
||||
) -> Result<bool> {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user