Skip to content

Commit 6b37f35

Browse files
authored
Plumb stack-switching config more in fuzzing (#13087)
Fixes a fuzz bug trying to work with #12967 since the fuzzer otherwise isn't aware of the `stack-switching` config option and how it's required for this test.
1 parent 008fe51 commit 6b37f35

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/fuzzing/src/generators/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ impl Config {
317317
Some(self.module_config.config.shared_everything_threads_enabled);
318318
cfg.wasm.wide_arithmetic = Some(self.module_config.config.wide_arithmetic_enabled);
319319
cfg.wasm.exceptions = Some(self.module_config.config.exceptions_enabled);
320+
cfg.wasm.stack_switching = Some(self.module_config.stack_switching);
320321
cfg.wasm.shared_memory = Some(self.module_config.shared_memory);
321322
if !self.module_config.config.simd_enabled {
322323
cfg.wasm.relaxed_simd = Some(false);
@@ -665,6 +666,7 @@ impl WasmtimeConfig {
665666
config.config.reference_types_enabled = false;
666667
config.config.exceptions_enabled = false;
667668
config.function_references_enabled = false;
669+
config.stack_switching = false;
668670

669671
// Winch's SIMD implementations require AVX and AVX2.
670672
if self

crates/fuzzing/src/generators/module.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub struct ModuleConfig {
2626
pub component_model_fixed_length_lists: bool,
2727
pub legacy_exceptions: bool,
2828
pub shared_memory: bool,
29+
pub stack_switching: bool,
2930
}
3031

3132
impl<'a> Arbitrary<'a> for ModuleConfig {
@@ -85,6 +86,7 @@ impl<'a> Arbitrary<'a> for ModuleConfig {
8586
component_model_fixed_length_lists: false,
8687
legacy_exceptions: false,
8788
shared_memory: false,
89+
stack_switching: false,
8890
function_references_enabled: config.gc_enabled,
8991
config,
9092
})

0 commit comments

Comments
 (0)