alexcrichton opened PR #1509 from spectests-fuzzer
to master
:
This commit adds a new fuzzer which is intended to run on oss-fuzz. This
fuzzer creates and arbitraryConfig
which should pass spec tests and
then asserts that it does so. The goal here is to weed out any
accidental bugs in global configuration which could cause
non-spec-compliant behavior.
alexcrichton requested fitzgen for a review on PR #1509.
fitzgen submitted PR Review.
fitzgen created PR Review Comment:
Let's move the body of this into a function in
wasmtime/crates/fuzzing/src/oracles.rs
so that it could (theoretically) be reused with other fuzzer engines, and is consistent with how our other fuzz targets are defined.
fitzgen submitted PR Review.
fitzgen created PR Review Comment:
Taking the mod won't result in a uniform distribution. Instead, this should be part of the
Arbitrary
impls:struct SpecFile { file: &'static str, contents: &'static str, } impl Arbitrary for SpecFile { fn arbitrary(u: &mut Unstructured) -> arbitrary::Result<Self> { // NB: this does get a uniform value in the provided range. let i = u.int_in_range(0, FILES.len())?; let (file, contents) = FILES[i]; Ok(SpecFile { file, contents }) } fn size_hint(_depth: usize) -> (usize, Option<usize>) { (1, Some(std::mem::size_of::<usize>())) } }
fitzgen created PR Review Comment:
This should be in
wasmtime/crates/fuzzing/src/generators.rs
with the rest of the test case generators. This allows us to reuse the concept "a spec compliant config" across different oracles, and is consistent with the rest of the infra.
fitzgen created PR Review Comment:
This should be a
log::debug!
so that it doesn't print except when we're debugging the test case and actually looking at the output. This should allow the fuzz target to run faster under oss-fuzz.
alexcrichton updated PR #1509 from spectests-fuzzer
to master
:
This commit adds a new fuzzer which is intended to run on oss-fuzz. This
fuzzer creates and arbitraryConfig
which should pass spec tests and
then asserts that it does so. The goal here is to weed out any
accidental bugs in global configuration which could cause
non-spec-compliant behavior.
alexcrichton updated PR #1509 from spectests-fuzzer
to master
:
This commit adds a new fuzzer which is intended to run on oss-fuzz. This
fuzzer creates and arbitraryConfig
which should pass spec tests and
then asserts that it does so. The goal here is to weed out any
accidental bugs in global configuration which could cause
non-spec-compliant behavior.
alexcrichton merged PR #1509.
Last updated: Dec 23 2024 at 13:07 UTC