Browse Source

fuzz: Increase table limit in differential_v8 fuzzer (#3879)

When manually increasing the table limit in this specific fuzzer we also
need to increase the limit in the pooling allocator itself if
configured.
pull/3881/head
Alex Crichton 3 years ago
committed by GitHub
parent
commit
d3fd1ebe5f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      fuzz/fuzz_targets/differential_v8.rs

8
fuzz/fuzz_targets/differential_v8.rs

@ -2,6 +2,7 @@
use libfuzzer_sys::arbitrary::{Result, Unstructured};
use libfuzzer_sys::fuzz_target;
use wasmtime_fuzzing::generators::InstanceAllocationStrategy;
use wasmtime_fuzzing::{generators, oracles};
fuzz_target!(|data: &[u8]| {
@ -23,6 +24,13 @@ fn run(data: &[u8]) -> Result<()> {
// Allow multiple tables, as set_differential_config() assumes reference
// types are disabled and therefore sets max_tables to 1
config.module_config.config.max_tables = 4;
if let InstanceAllocationStrategy::Pooling {
instance_limits: limits,
..
} = &mut config.wasmtime.strategy
{
limits.tables = 4;
}
let module = config.generate(&mut u, Some(1000))?;
oracles::differential_v8_execution(&module.to_bytes(), &config);

Loading…
Cancel
Save