Skip to content

fuzz: add all fuzzers to OSS-fuzz #1042

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

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ features = ["atty", "humantime", "termcolor"]
[workspace]
members = ["."]

# NOTE: If you add a new fuzzer below, please make sure to add it to the
# oss-fuzz-build.sh script, otherwise it won't get run in OSS-fuzz.

[[bin]]
name = "fuzz_regex_match"
path = "fuzz_targets/fuzz_regex_match.rs"
Expand Down
18 changes: 16 additions & 2 deletions fuzz/oss-fuzz-build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/bin/bash -eu

cd $SRC/regex
cargo fuzz build -O --debug-assertions
cp fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_regex_match $OUT/
cargo fuzz build -O --debug-assertions

targets=(
fuzz_regex_match
fuzz_regex_lite_match
fuzz_regex_automata_deserialize_dense_dfa
fuzz_regex_automata_deserialize_sparse_dfa
ast_roundtrip
ast_fuzz_match
ast_fuzz_regex
ast_fuzz_match_bytes
)
for target in "${targets[@]}"; do
cp fuzz/target/x86_64-unknown-linux-gnu/release/$target $OUT/
done