Skip to content

Commit df17dc2

Browse files
authored
Pin AFLplusplus ref to final Apache2 version (#3848)
* Fix AFLplusplus ref to final Apache2 version * rename everything to AFL_REV * clippy * clippy * fix
1 parent 1d67aff commit df17dc2

24 files changed

Lines changed: 302 additions & 331 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct_field_names = "allow" # ????
207207
too_many_lines = "allow"
208208
type_repetition_in_bounds = "allow"
209209
unreadable_literal = "allow"
210+
extra_unused_lifetimes = "allow" # TypedBuilder derive generates unused lifetimes
210211
unsafe_derive_deserialize = "allow"
211212
used_underscore_binding = "allow"
212213

crates/libafl/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ pub mod prelude {
8585
#![expect(ambiguous_glob_reexports)]
8686

8787
pub use super::{
88-
corpus::*, events::*, executors::*, feedbacks::*, fuzzer::*, generators::*, inputs::*,
89-
monitors::*, mutators::*, observers::*, schedulers::*, stages::*, state::*, *,
88+
corpus::*, events::*, executors::*, feedbacks::*, generators::*, inputs::*, monitors::*,
89+
mutators::*, observers::*, schedulers::*, stages::*, state::*, *,
9090
};
9191
}
9292

crates/libafl/src/monitors/stats/manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl ClientStatsManager {
8080
if self
8181
.sorted_client_ids
8282
.last()
83-
.map_or(true, |last| *last < client_id)
83+
.is_none_or(|last| *last < client_id)
8484
{
8585
self.sorted_client_ids.push(client_id);
8686
} else if let Err(idx) = self.sorted_client_ids.binary_search(&client_id) {

crates/libafl/src/stages/afl_stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ where
541541
let tmp_file = stats_file_path.with_extension("tmp");
542542

543543
std::fs::write(&tmp_file, stats.to_string())?;
544-
_ = std::fs::rename(&tmp_file, stats_file_path)?;
544+
std::fs::rename(&tmp_file, stats_file_path)?;
545545
}
546546
Ok(())
547547
}

crates/libafl_qemu/src/emu/drivers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ where
527527
fn try_from(value: EmulatorDriverResult<C>) -> Result<Self, Self::Error> {
528528
match value {
529529
EmulatorDriverResult::ReturnToClient(unhandled_qemu_exit) => {
530-
Err(format!("Unhandled QEMU exit: {:?}", &unhandled_qemu_exit))
530+
Err(format!("Unhandled QEMU exit: {unhandled_qemu_exit:?}"))
531531
}
532532
EmulatorDriverResult::EndOfRun(exit_kind) => Ok(exit_kind),
533533
EmulatorDriverResult::ShutdownRequest => {

crates/libafl_sugar/src/forkserver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@ impl ForkserverBytesCoverageSugar<'_> {
250250
state.corpus().count()
251251
);
252252
} else {
253-
log::info!("Loading from {:?}", &self.input_dirs);
253+
log::info!("Loading from {:?}", self.input_dirs);
254254
// Load from disk
255255
state
256256
.load_initial_inputs(&mut fuzzer, &mut executor, &mut mgr, self.input_dirs)
257257
.unwrap_or_else(|err| {
258258
panic!(
259259
"Failed to load initial corpus at {:?}: {err:?}",
260-
&self.input_dirs
260+
self.input_dirs
261261
);
262262
});
263263
log::info!("We imported {} inputs from disk.", state.corpus().count());

crates/libafl_sugar/src/inprocess.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ where
258258
state.corpus().count()
259259
);
260260
} else {
261-
log::info!("Loading from {:?}", &self.input_dirs);
261+
log::info!("Loading from {:?}", self.input_dirs);
262262
// Load from disk
263263
state
264264
.load_initial_inputs(&mut fuzzer, &mut executor, &mut mgr, self.input_dirs)
265265
.unwrap_or_else(|_| {
266-
panic!("Failed to load initial corpus at {:?}", &self.input_dirs);
266+
panic!("Failed to load initial corpus at {:?}", self.input_dirs);
267267
});
268268
log::info!("We imported {} inputs from disk.", state.corpus().count());
269269
}

crates/libafl_sugar/src/qemu.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ where
144144

145145
let mut out_dir = self.output_dir.clone();
146146
if fs::create_dir(&out_dir).is_err() {
147-
log::info!("Out dir at {} already exists.", &out_dir.display());
147+
log::info!("Out dir at {} already exists.", out_dir.display());
148148
assert!(
149149
out_dir.is_dir(),
150150
"Out dir at {} is not a valid directory!",
151-
&out_dir.display()
151+
out_dir.display()
152152
);
153153
}
154154
let mut crashes = out_dir.clone();
@@ -311,7 +311,7 @@ where
311311
state.corpus().count()
312312
);
313313
} else {
314-
log::info!("Loading from {:?}", &self.input_dirs);
314+
log::info!("Loading from {:?}", self.input_dirs);
315315
// Load from disk
316316
state
317317
.load_initial_inputs(
@@ -321,7 +321,7 @@ where
321321
self.input_dirs,
322322
)
323323
.unwrap_or_else(|_| {
324-
panic!("Failed to load initial corpus at {:?}", &self.input_dirs);
324+
panic!("Failed to load initial corpus at {:?}", self.input_dirs);
325325
});
326326
log::info!("We imported {} inputs from disk.", state.corpus().count());
327327
}
@@ -439,7 +439,7 @@ where
439439
state.corpus().count()
440440
);
441441
} else {
442-
log::info!("Loading from {:?}", &self.input_dirs);
442+
log::info!("Loading from {:?}", self.input_dirs);
443443
// Load from disk
444444
state
445445
.load_initial_inputs(
@@ -449,7 +449,7 @@ where
449449
self.input_dirs,
450450
)
451451
.unwrap_or_else(|_| {
452-
panic!("Failed to load initial corpus at {:?}", &self.input_dirs);
452+
panic!("Failed to load initial corpus at {:?}", self.input_dirs);
453453
});
454454
log::info!("We imported {} inputs from disk.", state.corpus().count());
455455
}

crates/libafl_tinyinst/src/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl<SP: ShMemProvider> TinyInstExecutorBuilder<'_, SP> {
319319
return Err(Error::unknown("No input file or shmem provided"));
320320
}
321321

322-
log::info!("tinyinst args: {:#?}", &self.tinyinst_args);
322+
log::info!("tinyinst args: {:#?}", self.tinyinst_args);
323323

324324
let cur_input = InputFile::create(INPUTFILE_STD)?;
325325
let tinyinst = TinyInst::new(

crates/shmem_providers/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,7 @@ where
18751875
}
18761876
}
18771877

1878+
#[allow(clippy::std_instead_of_core)] // core::io::IoSlice is unstable (core_io)
18781879
fn write_vectored(&mut self, bufs: &[std::io::IoSlice<'_>]) -> std::io::Result<usize> {
18791880
match self.empty_slice_mut().write_vectored(bufs) {
18801881
Ok(w) => {

0 commit comments

Comments
 (0)