From cb65c755c583b20bf6f04232f1d13d855dac5d87 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 28 Jan 2021 07:55:04 -0800 Subject: [PATCH] Disable module-linking in plain instantiate fuzzers We already cover module linking with the `instantiate-swarm` target and otherwise enabling module linking is preventing otherwise-valid modules from being compiled because of the breaking change in the module linking proposal with respect to imports. --- crates/fuzzing/src/oracles.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 6581f9e0dc..14e3b09e35 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -47,12 +47,11 @@ fn log_wasm(wasm: &[u8]) { /// /// You can control which compiler is used via passing a `Strategy`. pub fn instantiate(wasm: &[u8], known_valid: bool, strategy: Strategy) { - instantiate_with_config( - wasm, - known_valid, - crate::fuzz_default_config(strategy).unwrap(), - None, - ); + // Explicitly disable module linking for now since it's a breaking change to + // pre-module-linking modules due to imports + let mut cfg = crate::fuzz_default_config(strategy).unwrap(); + cfg.wasm_module_linking(false); + instantiate_with_config(wasm, known_valid, cfg, None); } /// Instantiate the Wasm buffer, and implicitly fail if we have an unexpected