diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 8688e73e0..a7eec2c81 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -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" diff --git a/fuzz/oss-fuzz-build.sh b/fuzz/oss-fuzz-build.sh index 38750250b..f96474739 100755 --- a/fuzz/oss-fuzz-build.sh +++ b/fuzz/oss-fuzz-build.sh @@ -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