Skip to content

Commit

Permalink
Disable module-linking in differential fuzzing (#2769)
Browse files Browse the repository at this point in the history
Currently this exposes a bug where modules broken by module linking
cause failures in the fuzzer, but we want to fuzz those modules since
module linking isn't enabled when generating these modules.
  • Loading branch information
alexcrichton authored Mar 25, 2021
1 parent 9476581 commit 81c4403
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/fuzzing/src/oracles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ pub fn differential_execution(
let wasm = module.to_bytes();
log_wasm(&wasm);

for config in &configs {
let engine = Engine::new(config).unwrap();
for mut config in configs {
// Disable module linking since it isn't enabled by default for
// `wasm_smith::Module` but is enabled by default for our fuzz config.
// Since module linking is currently a breaking change this is required
// to accept modules that would otherwise be broken by module linking.
config.wasm_module_linking(false);

let engine = Engine::new(&config).unwrap();
let store = Store::new(&engine);

let module = Module::new(&engine, &wasm).unwrap();
Expand Down

0 comments on commit 81c4403

Please sign in to comment.