Skip to content

Commit 16cb612

Browse files
authored
Merge pull request #45 from EliaGeretto/seed-warn
Print warning when skipping a large seed
2 parents 871b880 + f06c27a commit 16cb612

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

fuzzer/src/depot/sync.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub fn sync_depot(executor: &mut Executor, running: Arc<AtomicBool>, dir: &Path)
2626
if file_len < config::MAX_INPUT_LEN {
2727
let buf = read_from_file(path);
2828
executor.run_sync(&buf);
29+
} else {
30+
warn!("Seed discarded, too long: {:?}", path);
2931
}
3032
}
3133
}

fuzzer/src/fuzz_main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ pub fn fuzz_main(
6565
depot::sync_depot(&mut executor, running.clone(), &depot.dirs.seeds_dir);
6666

6767
if depot.empty() {
68-
error!("Failed to find any branches during dry run.\nPlease ensure that the binary has been instrumented and/or input directory is populated. \nPlease ensure that seed directory - {:?} has any file.", depot.dirs.seeds_dir);
68+
error!("Failed to find any branches during dry run.");
69+
error!("Please ensure that the binary has been instrumented and/or input directory is populated.");
70+
error!("Please ensure that seed directory - {:?} has any file.", depot.dirs.seeds_dir);
6971
panic!();
7072
}
7173

0 commit comments

Comments
 (0)