Browse Source

Enable nan canonicalization in differential fuzzing (#3557)

This fixes a fuzz issue discovered over the weekend where stores with
different values for nan canonicalization may produce different results.
This is expected, however, so the fix for differential execution is to
always enable nan canonicalization.
pull/3561/head
Alex Crichton 3 years ago
committed by GitHub
parent
commit
ec43254292
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      crates/fuzzing/src/oracles.rs

6
crates/fuzzing/src/oracles.rs

@ -265,6 +265,12 @@ pub fn differential_execution(
// to accept modules that would otherwise be broken by module linking.
config.wasm_module_linking(false);
// We don't want different configurations with different values for nan
// canonicalization since that can affect results. All configs should
// have the same value configured for this option, so `true` is
// arbitrarily chosen here.
config.cranelift_nan_canonicalization(true);
let engine = Engine::new(&config).unwrap();
let mut store = create_store(&engine);
if fuzz_config.consume_fuel {

Loading…
Cancel
Save