Skip to content

Commit

Permalink
fuzz: Add an Interpreter fuzzer
Browse files Browse the repository at this point in the history
We add an interpreter fuzzer, that generates a valid althrough could be
meaningless program, that we then run through interpreter.

Expectation here is that with grammer based fuzzing, we can find issues
within the interpreter implementation.

Note, currently we do not support target jumps, conditional or unconditional.

Signed-off-by: Aman <[email protected]>
  • Loading branch information
aman4150 committed Feb 26, 2025
1 parent 8e727e0 commit 97742e9
Show file tree
Hide file tree
Showing 3 changed files with 546 additions and 0 deletions.
1 change: 1 addition & 0 deletions fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ features = ["export-internals-for-testing"]
[dependencies.polkavm-linker]
path = "../crates/polkavm-linker"

[dependencies.polkavm-common]
path = "../crates/polkavm-common"

[[bin]]
name = "fuzz_shm_allocator"
path = "fuzz_targets/fuzz_shm_allocator.rs"
Expand All @@ -39,6 +42,13 @@ test = false
doc = false
bench = false

[[bin]]
name = "fuzz_interpreter"
path = "fuzz_targets/fuzz_interpreter.rs"
test = false
doc = false
bench = false

[workspace]
resolver = "2"
members = ["."]
Expand Down
Loading

0 comments on commit 97742e9

Please sign in to comment.