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

Function generate

crates/fuzzing/src/single_module_fuzzer.rs:343–351  ·  view source on GitHub ↗
(_: &mut T, u: &mut Unstructured<'_>)

Source from the content-addressed store, hash-verified

341 }
342
343 fn generate<T>(_: &mut T, u: &mut Unstructured<'_>) -> Result<(Vec<u8>, KnownValid)>
344 where
345 T: for<'a> Arbitrary<'a>,
346 {
347 Ok((
348 u.arbitrary::<wasm_smith::Module>()?.to_bytes(),
349 KnownValid::Yes,
350 ))
351 }
352
353 fn noop_mutate(_buf: &mut [u8], size: usize, _new_size: usize) -> usize {
354 size

Callers 5

static_api_smoke_testFunction · 0.50
generateMethod · 0.50
mutateMethod · 0.50
generateMethod · 0.50

Calls 2

OkFunction · 0.85
to_bytesMethod · 0.45

Tested by 1

static_api_smoke_testFunction · 0.40