File tree Expand file tree Collapse file tree 7 files changed +521
-7
lines changed Expand file tree Collapse file tree 7 files changed +521
-7
lines changed Original file line number Diff line number Diff line change 11target
2- Cargo.lock
2+ . / Cargo.lock
Original file line number Diff line number Diff line change 11language : rust
2- rust :
3- - 1.20.0
4- - nightly
5- - beta
6- - stable
2+ addons :
3+ apt :
4+ update : true
5+ packages :
6+ - binutils-dev
7+ - libunwind8-dev
8+ - libcurl4-openssl-dev
9+ - libelf-dev
10+ - libdw-dev
11+ - cmake
12+ - gcc
13+ - libiberty-dev
14+ matrix :
15+ include :
16+ - rust : 1.20.0
17+ - rust : nightly
18+ - rust : beta
19+ env : DO_FUZZ=true
20+ - rust : stable
21+ env : DO_FUZZ=true
722script : |
823 cargo build --verbose &&
924 cargo test --verbose &&
1025 cargo test --verbose --features serde &&
1126 ([ $TRAVIS_RUST_VERSION != nightly ] || cargo check --verbose --no-default-features) &&
1227 ([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --features union) &&
1328 ([ $TRAVIS_RUST_VERSION != nightly ] || cargo test --verbose --all-features) &&
14- ([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench)
29+ ([ $TRAVIS_RUST_VERSION != nightly ] || cargo bench --verbose bench) &&
30+ if [ "$DO_FUZZ" = true ]
31+ then
32+ (
33+ cd fuzz
34+ ./travis-fuzz.sh
35+ )
36+ fi
Original file line number Diff line number Diff line change 1+ [package ]
2+ name = " smallvec-fuzz"
3+ version = " 0.1.0"
4+ authors = [" Dawid Ciężarkiewicz <dpc@dpc.pw>" ]
5+ edition = " 2018"
6+ publish = false
7+
8+ [package .metadata ]
9+ cargo-fuzz = true
10+
11+ [features ]
12+ afl_fuzz = [" afl" ]
13+ honggfuzz_fuzz = [" honggfuzz" ]
14+
15+
16+ [dependencies ]
17+ honggfuzz = { version = " 0.5.45" , optional = true }
18+ afl = { version = " 0.4" , optional = true }
19+ smallvec = { path = " .." }
20+
21+ [workspace ]
22+ members = [" ." ]
23+
24+ [[bin ]]
25+ name = " smallvec_ops"
26+ path = " fuzz_targets/smallvec_ops.rs"
Original file line number Diff line number Diff line change 1+ # Fuzzer for smallvec
2+
3+ Based on fuzzing in [ rust-bitcoin] ( https://github.com/rust-bitcoin/rust-bitcoin/tree/c8ac25219a09bf9d017f1b05abe3e746e2136f73/fuzz )
4+
5+ ## Running manually with afl
6+
7+ ```
8+ cargo afl build --release --bin smallvec_ops --features afl && cargo afl fuzz -i in -o out target/release/smallvec_ops
9+ ```
10+
11+ # Useful links:
12+ * https://rust-fuzz.github.io/book/afl.html
You can’t perform that action at this time.
0 commit comments