Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Add differential fuzzing between old and new Cranelift backends. #617

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

cfallin
Copy link
Member

@cfallin cfallin commented Dec 17, 2020

This PR adds a fuzz target runnable via cargo-fuzz (with libFuzzer)
that builds an arbitrary Wasm module, produced by wasm-smith, with
lucetc using both the old and new Cranelift x86-64 backends. It then
instantiates both and invokes the start function in both, comparing the
global values and heap contents after the call returns.

The intent of this differential fuzzing is to validate that the new
backend works as well as the old one for the purposes of Lucet.

This change pulls in a new version of wasmtime and fixes a few small
issues (panics that should be errors) that the fuzzing immediately
discovered.

@cfallin cfallin force-pushed the cfallin/fuzz-new-backend branch 6 times, most recently from 616d2e3 to fb6912e Compare December 17, 2020 21:41
This PR adds a fuzz target runnable via `cargo-fuzz` (with `libFuzzer`)
that builds an arbitrary Wasm module, produced by `wasm-smith`, with
`lucetc` using both the old and new Cranelift x86-64 backends. It then
instantiates both and invokes the start function in both, comparing the
return values and heap contents after the call returns.

The intent of this differential fuzzing is to validate that the new
backend works as well as the old one for the purposes of Lucet.

This change pulls in a new version of wasmtime and fixes a few small
issues (panics that should be errors) that the fuzzing immediately
discovered.
@cfallin
Copy link
Member Author

cfallin commented Dec 17, 2020

Should be ready for review now (sorry for churn) -- verified that this is doing interesting things locally, with coverage across old/new backend.

@cfallin cfallin merged commit d65d11b into main Dec 17, 2020
@cfallin cfallin deleted the cfallin/fuzz-new-backend branch December 17, 2020 22:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants