Disable funcref generation for fuzz tests with inputs (#4797)

This fixes #4757, fixes #4758, and fixes new fuzzbugs that are probably
coming after we merged #4667.
This commit is contained in:
Jamey Sharp
2022-08-29 14:30:26 -07:00
committed by GitHub
parent 07767c3d4a
commit 4882347868

View File

@@ -190,6 +190,11 @@ where
}
pub fn generate_test(mut self) -> Result<TestCase> {
// If we're generating test inputs as well as a function, then we're planning to execute
// this function. That means that any function references in it need to exist. We don't yet
// have infrastructure for generating multiple functions, so just don't generate funcrefs.
self.config.funcrefs_per_function = 0..=0;
let func = self.generate_func()?;
let inputs = self.generate_test_inputs(&func.signature)?;
Ok(TestCase { func, inputs })