Skip to content

Commit 982a89a

Browse files
committed
fuzz: Adjust where NaN canonicalization is configured
Behavior of Winch changed in bytecodealliance#12939 in such a way that it's breaking differential fuzz testing with wasmi. Now that Winch supports NaN canonicalization this commit adjusts the fuzz test configuration generation to additionally enable it for Winch in addition to Cranelift.
1 parent f2bde1e commit 982a89a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

crates/fuzzing/src/generators/config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ impl Config {
334334

335335
cfg.codegen.inlining = self.wasmtime.inlining;
336336

337+
// If the wasm-smith-generated module use nan canonicalization then we
338+
// don't need to enable it, but if it doesn't enable it already then we
339+
// enable this codegen option.
340+
cfg.wasm.nan_canonicalization = Some(!self.module_config.config.canonicalize_nans);
341+
337342
// Only set cranelift specific flags when the Cranelift strategy is
338343
// chosen.
339344
if cranelift_strategy {
@@ -358,11 +363,6 @@ impl Config {
358363
));
359364
}
360365

361-
// If the wasm-smith-generated module use nan canonicalization then we
362-
// don't need to enable it, but if it doesn't enable it already then we
363-
// enable this codegen option.
364-
cfg.wasm.nan_canonicalization = Some(!self.module_config.config.canonicalize_nans);
365-
366366
// Enabling the verifier will at-least-double compilation time, which
367367
// with a 20-30x slowdown in fuzzing can cause issues related to
368368
// timeouts. If generated modules can have more than a small handful of

0 commit comments

Comments
 (0)