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.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use libfuzzer_sys::arbitrary::{Result, Unstructured};
|
use libfuzzer_sys::arbitrary::{Result, Unstructured};
|
||||||
use libfuzzer_sys::fuzz_target;
|
use libfuzzer_sys::fuzz_target;
|
||||||
|
use wasmtime_fuzzing::generators::InstanceAllocationStrategy;
|
||||||
use wasmtime_fuzzing::{generators, oracles};
|
use wasmtime_fuzzing::{generators, oracles};
|
||||||
|
|
||||||
fuzz_target!(|data: &[u8]| {
|
fuzz_target!(|data: &[u8]| {
|
||||||
@@ -23,6 +24,13 @@ fn run(data: &[u8]) -> Result<()> {
|
|||||||
// Allow multiple tables, as set_differential_config() assumes reference
|
// Allow multiple tables, as set_differential_config() assumes reference
|
||||||
// types are disabled and therefore sets max_tables to 1
|
// types are disabled and therefore sets max_tables to 1
|
||||||
config.module_config.config.max_tables = 4;
|
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))?;
|
let module = config.generate(&mut u, Some(1000))?;
|
||||||
oracles::differential_v8_execution(&module.to_bytes(), &config);
|
oracles::differential_v8_execution(&module.to_bytes(), &config);
|
||||||
|
|||||||
Reference in New Issue
Block a user