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

Function init_fuzzing

crates/fuzzing/src/lib.rs:29–35  ·  view source on GitHub ↗

One time start up initialization for fuzzing: Enables `env_logger`. Restricts `rayon` to a single thread in its thread pool, for more deterministic executions. If a fuzz target is taking raw input bytes from the fuzzer, it is fine to call this function in the fuzz target's oracle or in the fuzz target itself. However, if the fuzz target takes an `Arbitrary` type, and the `Arbitrary` implementat

()

Source from the content-addressed store, hash-verified

27/// the `Arbitrary` implementation should call this function, since it runs
28/// before the fuzz target itself.
29pub fn init_fuzzing() {
30 static INIT: std::sync::Once = std::sync::Once::new();
31
32 INIT.call_once(|| {
33 let _ = env_logger::try_init();
34 });
35}
36
37/// One time start up initialization for fuzzing:
38///

Callers 11

log_wasmFunction · 0.85
wast_testFunction · 0.85
misc_initFunction · 0.85
storeFunction · 0.85
static_api_testFunction · 0.85
check_memory_accessesFunction · 0.85
to_wasmtimeMethod · 0.85
generateMethod · 0.85
arbitraryMethod · 0.85
execute_oneFunction · 0.85

Calls 1

newFunction · 0.50

Tested by

no test coverage detected