Fix build/clippy errors and update CASR (#1375)
* fix new exciting clippy errors * fix CASR build errors * bump casr version * more clippy whack-a-mole * allow needless pass by ref mut as it is improperly marked unnecessary
This commit is contained in:
parent
b064eb3994
commit
81e9a9a60f
@ -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"] }
|
pyo3 = { version = "0.18.3", optional = true, features = ["serde", "macros"] }
|
||||||
concat-idents = { version = "1.1.3", optional = true }
|
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)
|
# optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable)
|
||||||
serial_test = { version = "2", optional = true }
|
serial_test = { version = "2", optional = true }
|
||||||
|
@ -72,7 +72,7 @@ pub unsafe fn shutdown_handler<SP>(
|
|||||||
signal: Signal,
|
signal: Signal,
|
||||||
_info: siginfo_t,
|
_info: siginfo_t,
|
||||||
_context: &mut ucontext_t,
|
_context: &mut ucontext_t,
|
||||||
data: &mut ShutdownSignalData,
|
data: &ShutdownSignalData,
|
||||||
) where
|
) where
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
|
@ -218,7 +218,7 @@ impl<E> TimeoutExecutor<E> {
|
|||||||
self.exec_tmout = exec_tmout;
|
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 {
|
if !self.batch_mode {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@ use libcasr::{
|
|||||||
asan::AsanStacktrace,
|
asan::AsanStacktrace,
|
||||||
constants::{
|
constants::{
|
||||||
STACK_FRAME_FILEPATH_IGNORE_REGEXES_CPP, STACK_FRAME_FILEPATH_IGNORE_REGEXES_GO,
|
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_FILEPATH_IGNORE_REGEXES_JAVA, STACK_FRAME_FILEPATH_IGNORE_REGEXES_PYTHON,
|
||||||
STACK_FRAME_FUNCTION_IGNORE_REGEXES_CPP, STACK_FRAME_FUNCTION_IGNORE_REGEXES_GO,
|
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,
|
STACK_FRAME_FUNCTION_IGNORE_REGEXES_PYTHON, STACK_FRAME_FUNCTION_IGNORE_REGEXES_RUST,
|
||||||
},
|
},
|
||||||
init_ignored_frames,
|
init_ignored_frames,
|
||||||
|
@ -280,7 +280,7 @@ where
|
|||||||
|
|
||||||
/// Cull the `Corpus`
|
/// Cull the `Corpus`
|
||||||
#[allow(clippy::unused_self)]
|
#[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::<TopAccountingMetadata>() else {
|
let Some(top_rated) = state.metadata_map().get::<TopAccountingMetadata>() else {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
@ -321,7 +321,7 @@ where
|
|||||||
|
|
||||||
/// Cull the `Corpus` using the `MinimizerScheduler`
|
/// Cull the `Corpus` using the `MinimizerScheduler`
|
||||||
#[allow(clippy::unused_self)]
|
#[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::<TopRatedsMetadata>() else {
|
let Some(top_rated) = state.metadata_map().get::<TopRatedsMetadata>() else {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ struct Bigger(Range<usize>);
|
|||||||
|
|
||||||
impl PartialOrd for Bigger {
|
impl PartialOrd for Bigger {
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
self.0.len().partial_cmp(&other.0.len())
|
Some(self.cmp(other))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ struct Earlier(Range<usize>);
|
|||||||
|
|
||||||
impl PartialOrd for Earlier {
|
impl PartialOrd for Earlier {
|
||||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
other.0.start.partial_cmp(&self.0.start)
|
Some(self.cmp(other))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ pub fn set_seed_fuzz_time<S: HasMetadata>(state: &mut S, fuzz_time: Duration) ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the time for a single seed to be used by this mutational stage
|
/// Get the time for a single seed to be used by this mutational stage
|
||||||
pub fn get_seed_fuzz_time<S: HasMetadata>(state: &mut S) -> Result<Option<Duration>, Error> {
|
pub fn get_seed_fuzz_time<S: HasMetadata>(state: &S) -> Result<Option<Duration>, Error> {
|
||||||
state
|
state
|
||||||
.metadata_map()
|
.metadata_map()
|
||||||
.get::<TuneableMutationalStageMetadata>()
|
.get::<TuneableMutationalStageMetadata>()
|
||||||
@ -262,7 +262,7 @@ impl TuneableMutationalStage<(), (), (), (), ()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set the time to mutate a single input in this mutational stage
|
/// Set the time to mutate a single input in this mutational stage
|
||||||
pub fn seed_fuzz_time<S: HasMetadata>(state: &mut S) -> Result<Option<Duration>, Error> {
|
pub fn seed_fuzz_time<S: HasMetadata>(state: &S) -> Result<Option<Duration>, Error> {
|
||||||
get_seed_fuzz_time(state)
|
get_seed_fuzz_time(state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
allow(clippy::useless_conversion)
|
allow(clippy::useless_conversion)
|
||||||
)]
|
)]
|
||||||
#![allow(clippy::needless_pass_by_value)]
|
#![allow(clippy::needless_pass_by_value)]
|
||||||
|
#![allow(clippy::needless_pass_by_ref_mut)]
|
||||||
#![allow(clippy::transmute_ptr_to_ptr)]
|
#![allow(clippy::transmute_ptr_to_ptr)]
|
||||||
#![allow(clippy::ptr_cast_constness)]
|
#![allow(clippy::ptr_cast_constness)]
|
||||||
#![allow(clippy::too_many_arguments)]
|
#![allow(clippy::too_many_arguments)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user