bytecodealliance / javy

JS to WebAssembly toolchain
Apache License 2.0
2.16k stars 103 forks source link

Initial skeleton for fuzzing infrastructure #699

Closed saulecabrera closed 2 months ago

saulecabrera commented 2 months ago

This set of commits introduce the initial skeleton for Javy's fuzzing infrastructure.

This commit focuses on the json-differential target, to check Javy's SIMD-based, custom JSON.parse and JSON.stringify implementations.

The implementation aims to take full advantage of libfuzzer's coverage capabilities and that's the reason why it uses the native version of QuickJS instead of the Wasm version.

Checklist

saulecabrera commented 2 months ago

Decided to drop clippy lints for fuzz targets in https://github.com/bytecodealliance/javy/pull/699/commits/7d94ba8179c80ef68b6b987ca1c1420aecd5a2e5. Originally I wanted to use clippy + nightly to ensure that fuzz targets are linted correctly, but I was not able to figure out a clean way to have clippy only lint the package and not its dependencies. I don't want to spend too much cycles on this, we can revisit if we think that linting the fuzz targets is crucial. See https://github.com/rust-lang/rust-clippy/issues/3837#issuecomment-617413116 for more details.