Skip to content

Enable fuzzing for wide arithmetic#8781

Merged
stevenfontanella merged 1 commit into
mainfrom
enable-wide-arithmetic-fuzz
May 27, 2026
Merged

Enable fuzzing for wide arithmetic#8781
stevenfontanella merged 1 commit into
mainfrom
enable-wide-arithmetic-fuzz

Conversation

@stevenfontanella
Copy link
Copy Markdown
Member

@stevenfontanella stevenfontanella commented May 27, 2026

Part of #8544, continued from #8661. The V8 implementation is ready now under an experimental flag.

@stevenfontanella stevenfontanella force-pushed the enable-wide-arithmetic-fuzz branch from 7465c0e to deda835 Compare May 27, 2026 20:01
Base automatically changed from wide-arithmetic-fuzzer to main May 27, 2026 20:16
stevenfontanella added a commit that referenced this pull request May 27, 2026
Part of #8544. Continued in #8781.

Drive-by fix: ensure that tuples aren't generated with a size larger
than TUPLE_MAX_SIZE:

```diff
-  size_t maxElements = 2 + upTo(fuzzParams->MAX_TUPLE_SIZE - 1);
+  size_t maxElements = 2 + upTo(fuzzParams->MAX_TUPLE_SIZE - 2);
```

After increasing the seed file size, the wide arithmetic instructions
[were
generated](https://github.com/WebAssembly/binaryen/actions/runs/26316945566/job/77478064626)
(ctrl + f "wideint"), but fails in CI due to #8770. For now I leave the
seed file unchanged without showing that the wide arithmetic
instructions are generated in the golden file.

Also generated a new seed for test/lit/fuzz-import.wast since it was
failing after these changes, seemingly due to bad luck (which the test
file mentions is a possibility).
@stevenfontanella stevenfontanella force-pushed the enable-wide-arithmetic-fuzz branch from deda835 to d03b102 Compare May 27, 2026 20:22
@stevenfontanella
Copy link
Copy Markdown
Member Author

Will run the fuzzer for a few hours before submitting. Currently at ~4k iterations with no issues.

@stevenfontanella stevenfontanella marked this pull request as ready for review May 27, 2026 20:25
@stevenfontanella stevenfontanella requested a review from a team as a code owner May 27, 2026 20:25
@stevenfontanella stevenfontanella requested review from kripken and removed request for a team May 27, 2026 20:25
@stevenfontanella
Copy link
Copy Markdown
Member Author

stevenfontanella commented May 27, 2026

Ran 6500 iterations with no issue. FWIW there may be some bugs in the V8 implementation that we might hit: https://issues.chromium.org/issues/514906333#comment9.

@stevenfontanella stevenfontanella merged commit ab25864 into main May 27, 2026
43 of 48 checks passed
@stevenfontanella stevenfontanella deleted the enable-wide-arithmetic-fuzz branch May 27, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants