Browse Source

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.
pull/4806/head
Jamey Sharp 2 years ago
committed by GitHub
parent
commit
4882347868
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cranelift/fuzzgen/src/lib.rs

5
cranelift/fuzzgen/src/lib.rs

@ -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 })

Loading…
Cancel
Save