Skip to content

Commit 19d9a4a

Browse files
authored
Set minimum stacks/instance size in the component-api fuzzer too (#12080)
Similar to other settings there needs to be a minimum when the pooling allocator is configured to actually be able to run modules.
1 parent 0a55f80 commit 19d9a4a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

crates/fuzzing/src/oracles/component_api.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ fn store<T>(input: &mut Unstructured<'_>, val: T) -> arbitrary::Result<Store<T>>
158158
set_min(&mut p.total_component_instances, 5);
159159
set_min(&mut p.total_core_instances, 5);
160160
set_min(&mut p.total_memories, 2);
161+
set_min(&mut p.total_stacks, 4);
161162
set_min(&mut p.max_memories_per_component, 2);
162163
set_min(&mut p.max_memories_per_module, 2);
164+
set_min(&mut p.component_instance_size, 64 << 10);
163165
p.memory_protection_keys = Enabled::No;
164166
p.max_memory_size = 10 << 20; // 10 MiB
165167
}

fuzz/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ mod component {
3838
}
3939

4040
fn write_static_api_tests(out: &mut String) -> Result<()> {
41+
println!("cargo:rerun-if-env-changed=WASMTIME_FUZZ_SEED");
4142
let seed = if let Ok(seed) = env::var("WASMTIME_FUZZ_SEED") {
4243
seed.parse::<u64>()
4344
.with_context(|| anyhow!("expected u64 in WASMTIME_FUZZ_SEED"))?

0 commit comments

Comments
 (0)