Misc libafl-fuzz improvements (#2463)
* libafl-fuzz: ignore seeds that are not regular files * libafl-fuzz: remove 4 dict files limit * libafl-fuzz: clippy * libafl-fuzz: add -t option * libafl-fuzz: fix typo in seed feedback
This commit is contained in:
parent
8fb80c3f3a
commit
6d4f071eaa
@ -144,13 +144,20 @@ pub fn check_autoresume(
|
|||||||
// Copy all our seeds to queue
|
// Copy all our seeds to queue
|
||||||
for file in std::fs::read_dir(intial_inputs)? {
|
for file in std::fs::read_dir(intial_inputs)? {
|
||||||
let path = file?.path();
|
let path = file?.path();
|
||||||
std::fs::copy(
|
let cpy_res = std::fs::copy(
|
||||||
&path,
|
&path,
|
||||||
queue_dir.join(path.file_name().ok_or(Error::illegal_state(format!(
|
queue_dir.join(path.file_name().ok_or(Error::illegal_state(format!(
|
||||||
"file {} in input directory does not have a filename",
|
"file {} in input directory does not have a filename",
|
||||||
path.display()
|
path.display()
|
||||||
)))?),
|
)))?),
|
||||||
)?;
|
);
|
||||||
|
if let Err(e) = cpy_res {
|
||||||
|
if matches!(e.kind(), io::ErrorKind::InvalidInput) {
|
||||||
|
println!("skipping {} since it is not a regular file", path.display());
|
||||||
|
} else {
|
||||||
|
return Err(e.into());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(file)
|
Ok(file)
|
||||||
|
@ -34,7 +34,7 @@ where
|
|||||||
pub fn new(inner: A, opt: &Opt) -> Self {
|
pub fn new(inner: A, opt: &Opt) -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner,
|
inner,
|
||||||
ignore_timeouts: opt.ignore_seed_issues,
|
ignore_timeouts: opt.ignore_timeouts,
|
||||||
ignore_seed_issues: opt.ignore_seed_issues,
|
ignore_seed_issues: opt.ignore_seed_issues,
|
||||||
exit_on_seed_issues: opt.exit_on_seed_issues,
|
exit_on_seed_issues: opt.exit_on_seed_issues,
|
||||||
phantom: PhantomData,
|
phantom: PhantomData,
|
||||||
|
@ -134,8 +134,8 @@ struct Opt {
|
|||||||
/// sync to a foreign fuzzer queue directory (requires -M, can be specified up to 32 times)
|
/// sync to a foreign fuzzer queue directory (requires -M, can be specified up to 32 times)
|
||||||
#[arg(short = 'F', num_args = 32)]
|
#[arg(short = 'F', num_args = 32)]
|
||||||
foreign_sync_dirs: Vec<PathBuf>,
|
foreign_sync_dirs: Vec<PathBuf>,
|
||||||
/// fuzzer dictionary (see README.md, specify up to 4 times)
|
/// fuzzer dictionary (see README.md)
|
||||||
#[arg(short = 'x', num_args = 4)]
|
#[arg(short = 'x')]
|
||||||
dicts: Vec<PathBuf>,
|
dicts: Vec<PathBuf>,
|
||||||
// Environment + CLI variables
|
// Environment + CLI variables
|
||||||
#[arg(short = 'G')]
|
#[arg(short = 'G')]
|
||||||
@ -152,13 +152,16 @@ struct Opt {
|
|||||||
#[arg(short = 'V')]
|
#[arg(short = 'V')]
|
||||||
fuzz_for_seconds: Option<usize>,
|
fuzz_for_seconds: Option<usize>,
|
||||||
|
|
||||||
|
/// timeout for each run
|
||||||
|
#[arg(short = 't', default_value_t = 1000)]
|
||||||
|
hang_timeout: u64,
|
||||||
|
|
||||||
// Environment Variables
|
// Environment Variables
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
bench_just_one: bool,
|
bench_just_one: bool,
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
bench_until_crash: bool,
|
bench_until_crash: bool,
|
||||||
#[clap(skip)]
|
|
||||||
hang_timeout: u64,
|
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
debug_child: bool,
|
debug_child: bool,
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user