restore fuzzer

This commit is contained in:
Luke Boswell 2024-11-27 11:25:14 +11:00
parent 2649716e4a
commit 171ddde998
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
3 changed files with 8 additions and 4 deletions

View file

@ -13,8 +13,12 @@ cargo-fuzz = true
test_syntax = { path = "../../test_syntax" }
roc_parse = { path = "../../parse" }
bumpalo.workspace = true
libfuzzer-sys.workspace = true
bumpalo = { version = "3.12.0", features = ["collections"] }
libfuzzer-sys = "0.4"
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[[bin]]
name = "fuzz_expr"

View file

@ -4,7 +4,7 @@ To setup fuzzing you will need to install cargo-fuzz and run with rust nightly:
```sh
$ cargo install cargo-fuzz
$ cargo +nightly fuzz run -j<cores> <target> -- -dict=../parse/fuzz/dict.txt
$ cargo +nightly fuzz run -j<cores> <target> -- -dict=../dict.txt
```
The different targets can be found by running `cargo fuzz list`.

View file

@ -1,6 +1,6 @@
#![no_main]
use bumpalo::Bump;
use libfuzzer_sys::fuzz_target;
use bumpalo::Bump;
use test_syntax::test_helpers::Input;
fuzz_target!(|data: &[u8]| {