Add Fuzz Tests for RVM Instructions#507
Merged
mohanson merged 1 commit intonervosnetwork:developfrom Apr 2, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new fuzz target covering the RISC-V M extension (mul/div/rem) and refactors existing fuzz targets to share common helper utilities.
Changes:
- Added
isa_mlibFuzzer target to differential-test M instructions across Spike, the interpreter core, and the asm core. - Extracted shared fuzz utilities (byte deque + register equivalence assertion) into
fuzz_targets/utils.rsand reused them inisa_a/isa_b. - Updated fuzz harness configuration and ignore patterns (
isa_mbin entry; ignorecoverage/output).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| fuzz/fuzz_targets/utils.rs | New shared helpers for deterministic byte consumption and register comparison across engines |
| fuzz/fuzz_targets/isa_m.rs | New fuzz target for M-extension instructions (MUL/DIV/REM + W variants) |
| fuzz/fuzz_targets/isa_b.rs | Refactor to reuse shared Deque and common register comparison helper |
| fuzz/fuzz_targets/isa_a.rs | Refactor to reuse shared Deque and common register comparison helper |
| fuzz/Cargo.toml | Registers new isa_m fuzz binary target |
| fuzz/.gitignore | Ignores generated coverage/ directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5889ec9 to
f367046
Compare
f367046 to
b6623e7
Compare
mohanson
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add fuzz tests for the M instruction set (multiplication and division)