MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / fuzz

Method fuzz

crates/fuzzing/src/oom.rs:344–347  ·  view source on GitHub ↗

Similar to `test` but instead of exhaustively injecting OOMs on every allocation, randomly chooses which allocation to OOM each iteration. Requires `max_iters` to be set.

(&self, test_func: impl Fn() -> Result<()>)

Source from the content-addressed store, hash-verified

342 ///
343 /// Requires `max_iters` to be set.
344 pub fn fuzz(&self, test_func: impl Fn() -> Result<()>) -> Result<()> {
345 let future = self.fuzz_async(|| async { test_func() });
346 crate::block_on(future)
347 }
348
349 /// The same as `fuzz` but `async`.
350 pub async fn fuzz_async(&self, test_func: impl AsyncFn() -> Result<()>) -> Result<()> {

Callers 2

test_fuzzFunction · 0.80
executeFunction · 0.80

Calls 2

fuzz_asyncMethod · 0.80
block_onFunction · 0.70

Tested by 1

test_fuzzFunction · 0.64