Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial naive fuzz testing based on wasm-smith #405

Merged
merged 2 commits into from
Aug 12, 2022
Merged

Conversation

Robbepop
Copy link
Member

This is a very naive fuzz testing framework based on the BytecodeAlliance's wasm-smith tool.
It currently only fuzz tests Wasm parsing, validation and translation to wasmi's internal bytecode.

In later revisions we want to add fuzz testing for execution as well.
However, this requires a proper baseline Wasm execution engine that we can use to compare wasmi against.
For this the BytecodeAlliance's Wasm spec interpreter is the best candidate but it is lacking a proper Rust crate and just lives inside of the Wasmtime repository as of now. This might change in the future.

We want to merge this PR because it is currently a major headache to work in difference feature branches with all of the fuzz testing artifacts around.

Developers should instead ignore .idea files locally.
This very simple implementation already found a bug in the wasmi_v1 Wasm -> wasmi bytecode translation procedure.
@codecov-commenter
Copy link

Codecov Report

Merging #405 (5a7f22a) into master (3886d91) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #405   +/-   ##
=======================================
  Coverage   76.37%   76.37%           
=======================================
  Files          70       70           
  Lines        6756     6756           
=======================================
  Hits         5160     5160           
  Misses       1596     1596           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Robbepop Robbepop merged commit 4d1f2ad into master Aug 12, 2022
@Robbepop Robbepop deleted the rf-fuzz-testing branch August 12, 2022 15:58
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