Skip to content

Commit 855c5c4

Browse files
committed
fuzz: add all fuzzers to OSS-fuzz
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 rust-lang#1037
1 parent 48daadc commit 855c5c4

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

fuzz/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ features = ["atty", "humantime", "termcolor"]
3232
[workspace]
3333
members = ["."]
3434

35+
# NOTE: If you add a new fuzzer below, please make sure to add it to the
36+
# oss-fuzz-build.sh script, otherwise it won't get run in OSS-fuzz.
37+
3538
[[bin]]
3639
name = "fuzz_regex_match"
3740
path = "fuzz_targets/fuzz_regex_match.rs"

fuzz/oss-fuzz-build.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
#!/bin/bash -eu
2+
23
cd $SRC/regex
3-
cargo fuzz build -O --debug-assertions
4-
cp fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_regex_match $OUT/
4+
cargo fuzz build -O --debug-assertions
5+
6+
targets=(
7+
fuzz_regex_match
8+
fuzz_regex_lite_match
9+
fuzz_regex_automata_deserialize_dense_dfa
10+
fuzz_regex_automata_deserialize_sparse_dfa
11+
ast_roundtrip
12+
ast_fuzz_match
13+
ast_fuzz_regex
14+
ast_fuzz_match_bytes
15+
)
16+
for target in "${targets[@]}"; do
17+
cp fuzz/target/x86_64-unknown-linux-gnu/release/$target $OUT/
18+
done

0 commit comments

Comments
 (0)