Skip to content

Commit

Permalink
fuzz: add all fuzzers to OSS-fuzz
Browse files Browse the repository at this point in the history
I forgot to do this step, and as a result, OSS-fuzz hasn't been running
any of the new fuzzers. Hopefully this is enough.

Ref #1037
  • Loading branch information
BurntSushi committed Jul 13, 2023
1 parent 48daadc commit 855c5c4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
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

0 comments on commit 855c5c4

Please sign in to comment.