Skip to content

Commit ed91691

Browse files
domenukkandreafioraldi
authored andcommitted
Better docu (#90)
* more docs * more docs: * more docu * more docu * finished docs * cleaned up markup * must_use tags added * more docs * more docu, less clippy * more fixes
1 parent bfa3fff commit ed91691

File tree

53 files changed

+794
-218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+794
-218
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Build Docs
5858
run: cargo doc
5959
- name: Test Docs
60-
run: cargo test --doc
60+
run: cargo test --all-features --doc
6161
- name: Run clippy
6262
run: ./clippy.sh
6363
windows:

clippy.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Clippy checks
33
cargo clean -p libafl
4-
RUST_BACKTRACE=full cargo clippy --all -- \
4+
RUST_BACKTRACE=full cargo clippy --all --all-features --tests -- \
55
-D clippy::pedantic \
66
-W clippy::cast_sign_loss \
77
-W clippy::similar-names \
@@ -10,9 +10,9 @@ RUST_BACKTRACE=full cargo clippy --all -- \
1010
-W clippy::unused_self \
1111
-W clippy::too_many_lines \
1212
-W clippy::option_if_let_else \
13-
-A missing-docs \
14-
-A clippy::doc_markdown \
15-
-A clippy::must-use-candidate \
13+
-W clippy::must-use-candidate \
14+
-W clippy::if-not-else \
15+
-W clippy::doc-markdown \
1616
-A clippy::type_repetition_in_bounds \
1717
-A clippy::missing-errors-doc \
1818
-A clippy::cast-possible-truncation \
@@ -23,4 +23,3 @@ RUST_BACKTRACE=full cargo clippy --all -- \
2323
-A clippy::unseparated-literal-suffix \
2424
-A clippy::module-name-repetitions \
2525
-A clippy::unreadable-literal \
26-
-A clippy::if-not-else \

fuzzers/frida_libpng/src/fuzzer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ unsafe fn fuzz(
276276
// Corpus that will be evolved, we keep it in memory for performance
277277
InMemoryCorpus::new(),
278278
// Feedbacks to rate the interestingness of an input
279-
MaxMapFeedback::new_with_observer_track(&edges_observer, true, false),
279+
MaxMapFeedback::new_tracking_with_observer(&edges_observer, true, false),
280280
// Corpus in which we store solutions (crashes in this example),
281281
// on disk so the user can get them after stopping the fuzzer
282282
OnDiskCorpus::new_save_meta(objective_dir, Some(OnDiskMetadataFormat::JsonPretty))

fuzzers/libfuzzer_libpng/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn fuzz(corpus_dirs: Vec<PathBuf>, objective_dir: PathBuf, broker_port: u16) ->
8080
InMemoryCorpus::new(),
8181
// Feedbacks to rate the interestingness of an input
8282
feedback_or!(
83-
MaxMapFeedback::new_with_observer_track(&edges_observer, true, false),
83+
MaxMapFeedback::new_tracking_with_observer(&edges_observer, true, false),
8484
TimeFeedback::new_with_observer(&time_observer)
8585
),
8686
// Corpus in which we store solutions (crashes in this example),

fuzzers/libfuzzer_reachability/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn fuzz(corpus_dirs: Vec<PathBuf>, objective_dir: PathBuf, broker_port: u16) ->
7979
// Corpus that will be evolved, we keep it in memory for performance
8080
InMemoryCorpus::new(),
8181
// Feedbacks to rate the interestingness of an input
82-
MaxMapFeedback::new_with_observer_track(&edges_observer, true, false),
82+
MaxMapFeedback::new_tracking_with_observer(&edges_observer, true, false),
8383
// Corpus in which we store solutions (crashes in this example),
8484
// on disk so the user can get them after stopping the fuzzer
8585
OnDiskCorpus::new(objective_dir).unwrap(),

fuzzers/libfuzzer_stb_image/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn fuzz(corpus_dirs: Vec<PathBuf>, objective_dir: PathBuf, broker_port: u16) ->
7878
InMemoryCorpus::new(),
7979
// Feedbacks to rate the interestingness of an input
8080
feedback_or!(
81-
MaxMapFeedback::new_with_observer_track(&edges_observer, true, false),
81+
MaxMapFeedback::new_tracking_with_observer(&edges_observer, true, false),
8282
TimeFeedback::new_with_observer(&time_observer)
8383
),
8484
// Corpus in which we store solutions (crashes in this example),

libafl/src/bolts/compress.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub struct GzipCompressor {
1717
impl GzipCompressor {
1818
/// If the buffer is at lest larger as large as the `threshold` value, we compress the buffer.
1919
/// When given a `threshold` of `0`, the `GzipCompressor` will always compress.
20+
#[must_use]
2021
pub fn new(threshold: usize) -> Self {
2122
GzipCompressor { threshold }
2223
}

0 commit comments

Comments
 (0)