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

Function execute

fuzz/fuzz_targets/instantiate.rs:33–48  ·  view source on GitHub ↗
(
    module: &[u8],
    known_valid: KnownValid,
    mut input: InstantiateInput,
    u: &mut Unstructured<'_>,
)

Source from the content-addressed store, hash-verified

31}
32
33fn execute(
34 module: &[u8],
35 known_valid: KnownValid,
36 mut input: InstantiateInput,
37 u: &mut Unstructured<'_>,
38) -> Result<()> {
39 let timeout = match input.timeout {
40 // If the input module isn't a "known valid" module then it can't be
41 // relied on self-regulating itself, so force a timeout via epochs/fuel
42 // in the configuration.
43 Timeout::None if known_valid == KnownValid::No => input.config.generate_timeout(u)?,
44 other => other,
45 };
46 instantiate(module, known_valid, &input.config, timeout);
47 Ok(())
48}
49
50fn gen_module(
51 input: &mut InstantiateInput,

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
generate_timeoutMethod · 0.80
instantiateFunction · 0.50

Tested by

no test coverage detected