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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user