roc/crates/compiler/test_syntax/fuzz
Joshua Warner 94070e8ba6
Improve parsing of scalar literals
* Unify parsing of string literals and scalar literals, to (e.g.) ensure escapes are handled uniformly. Notably, this makes unicode escapes valid in scalar literals.
* Add a variety of custom error messages about specific failure cases of parsing string/scalar literals. For example, if we're expecting a string (e.g. a package name in the header) and the user tried using single quotes, give a clear message about that.
* Fix formatting of unicode escapes (they previously used {}, now correctly use () to match roc strings)
2023-01-07 15:12:52 -08:00
..
fuzz_targets Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
.gitignore Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
Cargo.lock Improve parsing of scalar literals 2023-01-07 15:12:52 -08:00
Cargo.toml Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
dict.txt Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00
README.md Move syntax tests to a dedicated crate 2022-12-26 22:50:24 -08:00

fuzz

To setup fuzzing you will need to install cargo-fuzz and run with rust nightly:

$ cargo install cargo-fuzz
$ cargo +nightly fuzz run -j<cores> <target> -- -dict=../parse/fuzz/dict.txt

The different targets can be found by running cargo fuzz list.

When a bug is found, it will be reported with commands to run it again and look for a minimized version. If you are going to file a bug, please minimize the input before filing the bug.