diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index e84a53d57d..c267577381 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -105,7 +105,7 @@ z3 = { version = "0.11", features = ["static-link-z3"], optional = true } # for pyo3 = { version = "0.18.3", optional = true, features = ["serde", "macros"] } concat-idents = { version = "1.1.3", optional = true } -libcasr = { version = "2.5", optional = true} +libcasr = { version = "2.7", optional = true} # optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable) serial_test = { version = "2", optional = true } diff --git a/libafl/src/events/mod.rs b/libafl/src/events/mod.rs index dd74b482ae..65547aec24 100644 --- a/libafl/src/events/mod.rs +++ b/libafl/src/events/mod.rs @@ -72,7 +72,7 @@ pub unsafe fn shutdown_handler( signal: Signal, _info: siginfo_t, _context: &mut ucontext_t, - data: &mut ShutdownSignalData, + data: &ShutdownSignalData, ) where SP: ShMemProvider, { diff --git a/libafl/src/executors/timeout.rs b/libafl/src/executors/timeout.rs index 740c4be288..f9902e007f 100644 --- a/libafl/src/executors/timeout.rs +++ b/libafl/src/executors/timeout.rs @@ -218,7 +218,7 @@ impl TimeoutExecutor { self.exec_tmout = exec_tmout; } - pub(crate) fn handle_timeout(&mut self, data: &mut InProcessExecutorHandlerData) -> bool { + pub(crate) fn handle_timeout(&mut self, data: &InProcessExecutorHandlerData) -> bool { if !self.batch_mode { return false; } diff --git a/libafl/src/observers/stacktrace.rs b/libafl/src/observers/stacktrace.rs index 3e4dc1bdfe..86e27f60e5 100644 --- a/libafl/src/observers/stacktrace.rs +++ b/libafl/src/observers/stacktrace.rs @@ -23,8 +23,9 @@ use libcasr::{ asan::AsanStacktrace, constants::{ STACK_FRAME_FILEPATH_IGNORE_REGEXES_CPP, STACK_FRAME_FILEPATH_IGNORE_REGEXES_GO, - STACK_FRAME_FILEPATH_IGNORE_REGEXES_PYTHON, STACK_FRAME_FILEPATH_IGNORE_REGEXES_RUST, - STACK_FRAME_FUNCTION_IGNORE_REGEXES_CPP, STACK_FRAME_FUNCTION_IGNORE_REGEXES_GO, + STACK_FRAME_FILEPATH_IGNORE_REGEXES_JAVA, STACK_FRAME_FILEPATH_IGNORE_REGEXES_PYTHON, + STACK_FRAME_FILEPATH_IGNORE_REGEXES_RUST, STACK_FRAME_FUNCTION_IGNORE_REGEXES_CPP, + STACK_FRAME_FUNCTION_IGNORE_REGEXES_GO, STACK_FRAME_FUNCTION_IGNORE_REGEXES_JAVA, STACK_FRAME_FUNCTION_IGNORE_REGEXES_PYTHON, STACK_FRAME_FUNCTION_IGNORE_REGEXES_RUST, }, init_ignored_frames, diff --git a/libafl/src/schedulers/accounting.rs b/libafl/src/schedulers/accounting.rs index 63e79eb8bb..54d8dcf080 100644 --- a/libafl/src/schedulers/accounting.rs +++ b/libafl/src/schedulers/accounting.rs @@ -280,7 +280,7 @@ where /// Cull the `Corpus` #[allow(clippy::unused_self)] - pub fn accounting_cull(&self, state: &mut CS::State) -> Result<(), Error> { + pub fn accounting_cull(&self, state: &CS::State) -> Result<(), Error> { let Some(top_rated) = state.metadata_map().get::() else { return Ok(()); }; diff --git a/libafl/src/schedulers/minimizer.rs b/libafl/src/schedulers/minimizer.rs index 43ad19500e..a1217e54e5 100644 --- a/libafl/src/schedulers/minimizer.rs +++ b/libafl/src/schedulers/minimizer.rs @@ -321,7 +321,7 @@ where /// Cull the `Corpus` using the `MinimizerScheduler` #[allow(clippy::unused_self)] - pub fn cull(&self, state: &mut CS::State) -> Result<(), Error> { + pub fn cull(&self, state: &CS::State) -> Result<(), Error> { let Some(top_rated) = state.metadata_map().get::() else { return Ok(()); }; diff --git a/libafl/src/stages/colorization.rs b/libafl/src/stages/colorization.rs index 9f26aaab56..206be61750 100644 --- a/libafl/src/stages/colorization.rs +++ b/libafl/src/stages/colorization.rs @@ -27,7 +27,7 @@ struct Bigger(Range); impl PartialOrd for Bigger { fn partial_cmp(&self, other: &Self) -> Option { - self.0.len().partial_cmp(&other.0.len()) + Some(self.cmp(other)) } } @@ -43,7 +43,7 @@ struct Earlier(Range); impl PartialOrd for Earlier { fn partial_cmp(&self, other: &Self) -> Option { - other.0.start.partial_cmp(&self.0.start) + Some(self.cmp(other)) } } diff --git a/libafl/src/stages/tuneable.rs b/libafl/src/stages/tuneable.rs index f7b45499e4..07bd6b3908 100644 --- a/libafl/src/stages/tuneable.rs +++ b/libafl/src/stages/tuneable.rs @@ -60,7 +60,7 @@ pub fn set_seed_fuzz_time(state: &mut S, fuzz_time: Duration) -> } /// Get the time for a single seed to be used by this mutational stage -pub fn get_seed_fuzz_time(state: &mut S) -> Result, Error> { +pub fn get_seed_fuzz_time(state: &S) -> Result, Error> { state .metadata_map() .get::() @@ -262,7 +262,7 @@ impl TuneableMutationalStage<(), (), (), (), ()> { } /// Set the time to mutate a single input in this mutational stage - pub fn seed_fuzz_time(state: &mut S) -> Result, Error> { + pub fn seed_fuzz_time(state: &S) -> Result, Error> { get_seed_fuzz_time(state) } } diff --git a/libafl_qemu/src/lib.rs b/libafl_qemu/src/lib.rs index 8a9d42903e..f0155783b4 100644 --- a/libafl_qemu/src/lib.rs +++ b/libafl_qemu/src/lib.rs @@ -7,6 +7,7 @@ allow(clippy::useless_conversion) )] #![allow(clippy::needless_pass_by_value)] +#![allow(clippy::needless_pass_by_ref_mut)] #![allow(clippy::transmute_ptr_to_ptr)] #![allow(clippy::ptr_cast_constness)] #![allow(clippy::too_many_arguments)]