Fix differential fuzzing when Wasmtime hits an OOM (#6273)

OSS-Fuzz found a case where the `differential` fuzzer was failing and
the underlying cause was that Wasmtime was hitting an OOM while Wasmi
wasn't. This meant that the two modules were producing "different
results" since memories had differing lengths, but this isn't a failure
we're interested in. This commit updates the differential fuzzer to
discard the test case once the Wasmtime half reaches OOM.
This commit is contained in:
Alex Crichton
2023-04-24 11:00:24 -05:00
committed by GitHub
parent 3e06a0a2bd
commit 4b703f9dce
2 changed files with 24 additions and 1 deletions

View File

@@ -130,6 +130,11 @@ impl WasmtimeInstance {
})
.collect()
}
/// Returns whether or not this instance has hit its OOM condition yet.
pub fn is_oom(&self) -> bool {
self.store.data().is_oom()
}
}
impl DiffInstance for WasmtimeInstance {