Delete 'static from libafl::events (#2285)
This commit is contained in:
parent
bc5ae151bc
commit
1b008ae2e4
@ -54,7 +54,7 @@ pub(crate) const _LLMP_TAG_TO_MAIN: Tag = Tag(0x3453453);
|
|||||||
pub struct CentralizedEventManager<EM, SP>
|
pub struct CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: UsesState,
|
EM: UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
inner: EM,
|
inner: EM,
|
||||||
/// The LLMP client for inter process communication
|
/// The LLMP client for inter process communication
|
||||||
@ -286,7 +286,7 @@ impl CentralizedEventManagerBuilder {
|
|||||||
impl<EM, SP> UsesState for CentralizedEventManager<EM, SP>
|
impl<EM, SP> UsesState for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: UsesState,
|
EM: UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
type State = EM::State;
|
type State = EM::State;
|
||||||
}
|
}
|
||||||
@ -295,7 +295,7 @@ where
|
|||||||
impl<EM, SP> AdaptiveSerializer for CentralizedEventManager<EM, SP>
|
impl<EM, SP> AdaptiveSerializer for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: AdaptiveSerializer + UsesState,
|
EM: AdaptiveSerializer + UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn serialization_time(&self) -> Duration {
|
fn serialization_time(&self) -> Duration {
|
||||||
self.inner.serialization_time()
|
self.inner.serialization_time()
|
||||||
@ -332,14 +332,14 @@ where
|
|||||||
impl<EM, SP> AdaptiveSerializer for CentralizedEventManager<EM, SP>
|
impl<EM, SP> AdaptiveSerializer for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: AdaptiveSerializer + UsesState,
|
EM: AdaptiveSerializer + UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<EM, SP> EventFirer for CentralizedEventManager<EM, SP>
|
impl<EM, SP> EventFirer for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: AdaptiveSerializer + EventFirer + HasEventManagerId,
|
EM: AdaptiveSerializer + EventFirer + HasEventManagerId,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn should_send(&self) -> bool {
|
fn should_send(&self) -> bool {
|
||||||
self.inner.should_send()
|
self.inner.should_send()
|
||||||
@ -429,7 +429,7 @@ where
|
|||||||
impl<EM, SP> EventRestarter for CentralizedEventManager<EM, SP>
|
impl<EM, SP> EventRestarter for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: EventRestarter,
|
EM: EventRestarter,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn on_restart(&mut self, state: &mut Self::State) -> Result<(), Error> {
|
fn on_restart(&mut self, state: &mut Self::State) -> Result<(), Error> {
|
||||||
@ -458,7 +458,7 @@ where
|
|||||||
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
||||||
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
||||||
Self::State: HasExecutions + HasMetadata,
|
Self::State: HasExecutions + HasMetadata,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn process(
|
fn process(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -484,14 +484,14 @@ where
|
|||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
Z: EvaluatorObservers<E::Observers, State = Self::State>
|
||||||
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
+ ExecutionProcessor<E::Observers, State = Self::State>,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<EM, SP> HasCustomBufHandlers for CentralizedEventManager<EM, SP>
|
impl<EM, SP> HasCustomBufHandlers for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: HasCustomBufHandlers,
|
EM: HasCustomBufHandlers,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Adds a custom buffer handler that will run for each incoming `CustomBuf` event.
|
/// Adds a custom buffer handler that will run for each incoming `CustomBuf` event.
|
||||||
fn add_custom_buf_handler(
|
fn add_custom_buf_handler(
|
||||||
@ -508,14 +508,14 @@ impl<EM, SP> ProgressReporter for CentralizedEventManager<EM, SP>
|
|||||||
where
|
where
|
||||||
EM: AdaptiveSerializer + ProgressReporter + HasEventManagerId,
|
EM: AdaptiveSerializer + ProgressReporter + HasEventManagerId,
|
||||||
EM::State: HasMetadata + HasExecutions + HasLastReportTime,
|
EM::State: HasMetadata + HasExecutions + HasLastReportTime,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<EM, SP> HasEventManagerId for CentralizedEventManager<EM, SP>
|
impl<EM, SP> HasEventManagerId for CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: HasEventManagerId + UsesState,
|
EM: HasEventManagerId + UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn mgr_id(&self) -> EventManagerId {
|
fn mgr_id(&self) -> EventManagerId {
|
||||||
self.inner.mgr_id()
|
self.inner.mgr_id()
|
||||||
@ -525,7 +525,7 @@ where
|
|||||||
impl<EM, SP> CentralizedEventManager<EM, SP>
|
impl<EM, SP> CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: UsesState,
|
EM: UsesState,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Describe the client event manager's LLMP parts in a restorable fashion
|
/// Describe the client event manager's LLMP parts in a restorable fashion
|
||||||
pub fn describe(&self) -> Result<LlmpClientDescription, Error> {
|
pub fn describe(&self) -> Result<LlmpClientDescription, Error> {
|
||||||
@ -548,7 +548,7 @@ where
|
|||||||
impl<EM, SP> CentralizedEventManager<EM, SP>
|
impl<EM, SP> CentralizedEventManager<EM, SP>
|
||||||
where
|
where
|
||||||
EM: UsesState + EventFirer + AdaptiveSerializer + HasEventManagerId,
|
EM: UsesState + EventFirer + AdaptiveSerializer + HasEventManagerId,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
#[cfg(feature = "llmp_compression")]
|
#[cfg(feature = "llmp_compression")]
|
||||||
fn forward_to_main<I>(&mut self, event: &Event<I>) -> Result<(), Error>
|
fn forward_to_main<I>(&mut self, event: &Event<I>) -> Result<(), Error>
|
||||||
|
@ -144,7 +144,7 @@ where
|
|||||||
CF: FnOnce(Option<S>, LlmpRestartingEventManager<EMH, S, SP>, CoreId) -> Result<(), Error>,
|
CF: FnOnce(Option<S>, LlmpRestartingEventManager<EMH, S, SP>, CoreId) -> Result<(), Error>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
MT: Monitor + Clone,
|
MT: Monitor + Clone,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||||
@ -169,9 +169,9 @@ where
|
|||||||
impl<'a, CF, MT, S, SP> Launcher<'a, CF, (), MT, S, SP>
|
impl<'a, CF, MT, S, SP> Launcher<'a, CF, (), MT, S, SP>
|
||||||
where
|
where
|
||||||
CF: FnOnce(Option<S>, LlmpRestartingEventManager<(), S, SP>, CoreId) -> Result<(), Error>,
|
CF: FnOnce(Option<S>, LlmpRestartingEventManager<(), S, SP>, CoreId) -> Result<(), Error>,
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Launch the broker and the clients and fuzz
|
/// Launch the broker and the clients and fuzz
|
||||||
#[cfg(all(unix, feature = "std", feature = "fork"))]
|
#[cfg(all(unix, feature = "std", feature = "fork"))]
|
||||||
@ -192,9 +192,9 @@ impl<'a, CF, EMH, MT, S, SP> Launcher<'a, CF, EMH, MT, S, SP>
|
|||||||
where
|
where
|
||||||
CF: FnOnce(Option<S>, LlmpRestartingEventManager<EMH, S, SP>, CoreId) -> Result<(), Error>,
|
CF: FnOnce(Option<S>, LlmpRestartingEventManager<EMH, S, SP>, CoreId) -> Result<(), Error>,
|
||||||
EMH: EventManagerHooksTuple<S> + Clone + Copy,
|
EMH: EventManagerHooksTuple<S> + Clone + Copy,
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Launch the broker and the clients and fuzz with a user-supplied hook
|
/// Launch the broker and the clients and fuzz with a user-supplied hook
|
||||||
#[cfg(all(unix, feature = "std", feature = "fork"))]
|
#[cfg(all(unix, feature = "std", feature = "fork"))]
|
||||||
@ -564,9 +564,9 @@ where
|
|||||||
CentralizedEventManager<StdCentralizedInnerMgr<S, SP>, SP>,
|
CentralizedEventManager<StdCentralizedInnerMgr<S, SP>, SP>,
|
||||||
CoreId,
|
CoreId,
|
||||||
) -> Result<(), Error>,
|
) -> Result<(), Error>,
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Launch a standard Centralized-based fuzzer
|
/// Launch a standard Centralized-based fuzzer
|
||||||
pub fn launch(&mut self) -> Result<(), Error> {
|
pub fn launch(&mut self) -> Result<(), Error> {
|
||||||
@ -603,9 +603,9 @@ where
|
|||||||
CentralizedEventManager<IM, SP>, // No hooks for centralized EM
|
CentralizedEventManager<IM, SP>, // No hooks for centralized EM
|
||||||
CoreId,
|
CoreId,
|
||||||
) -> Result<(), Error>,
|
) -> Result<(), Error>,
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Launch a Centralized-based fuzzer.
|
/// Launch a Centralized-based fuzzer.
|
||||||
/// - `main_inner_mgr_builder` will be called to build the inner manager of the main node.
|
/// - `main_inner_mgr_builder` will be called to build the inner manager of the main node.
|
||||||
|
@ -25,7 +25,7 @@ pub struct CentralizedLlmpHook<I, SP> {
|
|||||||
impl<I, SP> LlmpHook<SP> for CentralizedLlmpHook<I, SP>
|
impl<I, SP> LlmpHook<SP> for CentralizedLlmpHook<I, SP>
|
||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn on_new_message(
|
fn on_new_message(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -76,7 +76,7 @@ impl<I, SP> Debug for CentralizedLlmpHook<I, SP> {
|
|||||||
impl<I, SP> CentralizedLlmpHook<I, SP>
|
impl<I, SP> CentralizedLlmpHook<I, SP>
|
||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Create an event broker from a raw broker.
|
/// Create an event broker from a raw broker.
|
||||||
pub fn new() -> Result<Self, Error> {
|
pub fn new() -> Result<Self, Error> {
|
||||||
|
@ -26,7 +26,7 @@ pub mod centralized;
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct StdLlmpEventHook<I, MT, SP>
|
pub struct StdLlmpEventHook<I, MT, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
monitor: MT,
|
monitor: MT,
|
||||||
#[cfg(feature = "llmp_compression")]
|
#[cfg(feature = "llmp_compression")]
|
||||||
@ -38,7 +38,7 @@ impl<I, MT, SP> LlmpHook<SP> for StdLlmpEventHook<I, MT, SP>
|
|||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
MT: Monitor,
|
MT: Monitor,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn on_new_message(
|
fn on_new_message(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -84,7 +84,7 @@ where
|
|||||||
impl<I, MT, SP> StdLlmpEventHook<I, MT, SP>
|
impl<I, MT, SP> StdLlmpEventHook<I, MT, SP>
|
||||||
where
|
where
|
||||||
I: Input,
|
I: Input,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
MT: Monitor,
|
MT: Monitor,
|
||||||
{
|
{
|
||||||
/// Create an event broker from a raw broker.
|
/// Create an event broker from a raw broker.
|
||||||
|
@ -55,7 +55,7 @@ use crate::{
|
|||||||
pub struct LlmpEventManager<EMH, S, SP>
|
pub struct LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// We only send 1 testcase for every `throttle` second
|
/// We only send 1 testcase for every `throttle` second
|
||||||
pub(crate) throttle: Option<Duration>,
|
pub(crate) throttle: Option<Duration>,
|
||||||
@ -396,7 +396,7 @@ impl<EMH> LlmpEventManagerBuilder<EMH> {
|
|||||||
#[cfg(feature = "adaptive_serialization")]
|
#[cfg(feature = "adaptive_serialization")]
|
||||||
impl<EMH, S, SP> AdaptiveSerializer for LlmpEventManager<EMH, S, SP>
|
impl<EMH, S, SP> AdaptiveSerializer for LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
fn serialization_time(&self) -> Duration {
|
fn serialization_time(&self) -> Duration {
|
||||||
@ -432,7 +432,7 @@ where
|
|||||||
|
|
||||||
impl<EMH, S, SP> core::fmt::Debug for LlmpEventManager<EMH, S, SP>
|
impl<EMH, S, SP> core::fmt::Debug for LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
@ -450,7 +450,7 @@ where
|
|||||||
|
|
||||||
impl<EMH, S, SP> Drop for LlmpEventManager<EMH, S, SP>
|
impl<EMH, S, SP> Drop for LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
/// LLMP clients will have to wait until their pages are mapped by somebody.
|
/// LLMP clients will have to wait until their pages are mapped by somebody.
|
||||||
@ -462,7 +462,7 @@ where
|
|||||||
impl<EMH, S, SP> LlmpEventManager<EMH, S, SP>
|
impl<EMH, S, SP> LlmpEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Calling this function will tell the llmp broker that this client is exiting
|
/// Calling this function will tell the llmp broker that this client is exiting
|
||||||
/// This should be called from the restarter not from the actual fuzzer client
|
/// This should be called from the restarter not from the actual fuzzer client
|
||||||
@ -514,7 +514,7 @@ impl<EMH, S, SP> LlmpEventManager<EMH, S, SP>
|
|||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
// Handle arriving events in the client
|
// Handle arriving events in the client
|
||||||
#[allow(clippy::unused_self)]
|
#[allow(clippy::unused_self)]
|
||||||
|
@ -91,7 +91,7 @@ impl LlmpShouldSaveState {
|
|||||||
pub struct LlmpEventConverter<DI, IC, ICB, S, SP>
|
pub struct LlmpEventConverter<DI, IC, ICB, S, SP>
|
||||||
where
|
where
|
||||||
S: UsesInput,
|
S: UsesInput,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
DI: Input,
|
DI: Input,
|
||||||
@ -153,7 +153,7 @@ impl LlmpEventConverterBuilder {
|
|||||||
converter_back: Option<ICB>,
|
converter_back: Option<ICB>,
|
||||||
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: UsesInput,
|
S: UsesInput,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
@ -182,7 +182,7 @@ impl LlmpEventConverterBuilder {
|
|||||||
converter_back: Option<ICB>,
|
converter_back: Option<ICB>,
|
||||||
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: UsesInput,
|
S: UsesInput,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
@ -212,7 +212,7 @@ impl LlmpEventConverterBuilder {
|
|||||||
converter_back: Option<ICB>,
|
converter_back: Option<ICB>,
|
||||||
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
) -> Result<LlmpEventConverter<DI, IC, ICB, S, SP>, Error>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: UsesInput,
|
S: UsesInput,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
@ -235,7 +235,7 @@ impl LlmpEventConverterBuilder {
|
|||||||
|
|
||||||
impl<DI, IC, ICB, S, SP> core::fmt::Debug for LlmpEventConverter<DI, IC, ICB, S, SP>
|
impl<DI, IC, ICB, S, SP> core::fmt::Debug for LlmpEventConverter<DI, IC, ICB, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: UsesInput,
|
S: UsesInput,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
@ -258,7 +258,7 @@ where
|
|||||||
impl<DI, IC, ICB, S, SP> LlmpEventConverter<DI, IC, ICB, S, SP>
|
impl<DI, IC, ICB, S, SP> LlmpEventConverter<DI, IC, ICB, S, SP>
|
||||||
where
|
where
|
||||||
S: UsesInput + HasExecutions + HasMetadata,
|
S: UsesInput + HasExecutions + HasMetadata,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
IC: InputConverter<From = S::Input, To = DI>,
|
IC: InputConverter<From = S::Input, To = DI>,
|
||||||
ICB: InputConverter<From = DI, To = S::Input>,
|
ICB: InputConverter<From = DI, To = S::Input>,
|
||||||
DI: Input,
|
DI: Input,
|
||||||
|
@ -62,7 +62,7 @@ use crate::{
|
|||||||
pub struct LlmpRestartingEventManager<EMH, S, SP>
|
pub struct LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
//CE: CustomEvent<I>,
|
//CE: CustomEvent<I>,
|
||||||
{
|
{
|
||||||
/// The embedded LLMP event manager
|
/// The embedded LLMP event manager
|
||||||
@ -76,7 +76,7 @@ where
|
|||||||
#[cfg(all(feature = "std", feature = "adaptive_serialization"))]
|
#[cfg(all(feature = "std", feature = "adaptive_serialization"))]
|
||||||
impl<EMH, S, SP> AdaptiveSerializer for LlmpRestartingEventManager<EMH, S, SP>
|
impl<EMH, S, SP> AdaptiveSerializer for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
fn serialization_time(&self) -> Duration {
|
fn serialization_time(&self) -> Duration {
|
||||||
@ -113,7 +113,7 @@ where
|
|||||||
#[cfg(all(feature = "std", not(feature = "adaptive_serialization")))]
|
#[cfg(all(feature = "std", not(feature = "adaptive_serialization")))]
|
||||||
impl<EMH, S, SP> AdaptiveSerializer for LlmpRestartingEventManager<EMH, S, SP>
|
impl<EMH, S, SP> AdaptiveSerializer for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
S: State,
|
S: State,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ where
|
|||||||
impl<EMH, S, SP> UsesState for LlmpRestartingEventManager<EMH, S, SP>
|
impl<EMH, S, SP> UsesState for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
type State = S;
|
type State = S;
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ where
|
|||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata,
|
S: State + HasExecutions + HasMetadata,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<E::Observers, State = S>
|
||||||
+ EvaluatorObservers<E::Observers>
|
+ EvaluatorObservers<E::Observers>
|
||||||
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
||||||
@ -237,7 +237,7 @@ where
|
|||||||
for<'a> E::Observers: Deserialize<'a>,
|
for<'a> E::Observers: Deserialize<'a>,
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
S: State + HasExecutions + HasMetadata + HasLastReportTime,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
Z: ExecutionProcessor<E::Observers, State = S>
|
Z: ExecutionProcessor<E::Observers, State = S>
|
||||||
+ EvaluatorObservers<E::Observers>
|
+ EvaluatorObservers<E::Observers>
|
||||||
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
+ Evaluator<E, LlmpEventManager<EMH, S, SP>>,
|
||||||
@ -248,7 +248,7 @@ where
|
|||||||
impl<EMH, S, SP> HasEventManagerId for LlmpRestartingEventManager<EMH, S, SP>
|
impl<EMH, S, SP> HasEventManagerId for LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn mgr_id(&self) -> EventManagerId {
|
fn mgr_id(&self) -> EventManagerId {
|
||||||
self.llmp_mgr.mgr_id()
|
self.llmp_mgr.mgr_id()
|
||||||
@ -265,7 +265,7 @@ const _ENV_FUZZER_BROKER_CLIENT_INITIAL: &str = "_AFL_ENV_FUZZER_BROKER_CLIENT";
|
|||||||
impl<EMH, S, SP> LlmpRestartingEventManager<EMH, S, SP>
|
impl<EMH, S, SP> LlmpRestartingEventManager<EMH, S, SP>
|
||||||
where
|
where
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
//CE: CustomEvent<I>,
|
//CE: CustomEvent<I>,
|
||||||
{
|
{
|
||||||
/// Create a new runner, the executed child doing the actual fuzzing.
|
/// Create a new runner, the executed child doing the actual fuzzing.
|
||||||
@ -344,8 +344,8 @@ pub fn setup_restarting_mgr_std<MT, S>(
|
|||||||
Error,
|
Error,
|
||||||
>
|
>
|
||||||
where
|
where
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
{
|
{
|
||||||
RestartingMgr::builder()
|
RestartingMgr::builder()
|
||||||
.shmem_provider(StdShMemProvider::new()?)
|
.shmem_provider(StdShMemProvider::new()?)
|
||||||
@ -375,8 +375,8 @@ pub fn setup_restarting_mgr_std<MT, S>(
|
|||||||
Error,
|
Error,
|
||||||
>
|
>
|
||||||
where
|
where
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
{
|
{
|
||||||
RestartingMgr::builder()
|
RestartingMgr::builder()
|
||||||
.shmem_provider(StdShMemProvider::new()?)
|
.shmem_provider(StdShMemProvider::new()?)
|
||||||
@ -399,7 +399,7 @@ pub struct RestartingMgr<EMH, MT, S, SP>
|
|||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S>,
|
EMH: EventManagerHooksTuple<S>,
|
||||||
S: State,
|
S: State,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
MT: Monitor,
|
MT: Monitor,
|
||||||
//CE: CustomEvent<I>,
|
//CE: CustomEvent<I>,
|
||||||
{
|
{
|
||||||
@ -448,8 +448,8 @@ impl<EMH, MT, S, SP> RestartingMgr<EMH, MT, S, SP>
|
|||||||
where
|
where
|
||||||
EMH: EventManagerHooksTuple<S> + Copy + Clone,
|
EMH: EventManagerHooksTuple<S> + Copy + Clone,
|
||||||
SP: ShMemProvider,
|
SP: ShMemProvider,
|
||||||
S: State + HasExecutions + 'static,
|
S: State + HasExecutions,
|
||||||
MT: Monitor + Clone + 'static,
|
MT: Monitor + Clone,
|
||||||
{
|
{
|
||||||
/// Launch the broker and the clients and fuzz
|
/// Launch the broker and the clients and fuzz
|
||||||
pub fn launch(&mut self) -> Result<(Option<S>, LlmpRestartingEventManager<EMH, S, SP>), Error> {
|
pub fn launch(&mut self) -> Result<(Option<S>, LlmpRestartingEventManager<EMH, S, SP>), Error> {
|
||||||
|
@ -703,7 +703,7 @@ impl LlmpMsg {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum LlmpConnection<HT, SP>
|
pub enum LlmpConnection<HT, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// A broker and a thread using this tcp background thread
|
/// A broker and a thread using this tcp background thread
|
||||||
IsBroker {
|
IsBroker {
|
||||||
@ -2022,7 +2022,7 @@ where
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct LlmpBrokerState<SP>
|
pub struct LlmpBrokerState<SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Broadcast map from broker to all clients
|
/// Broadcast map from broker to all clients
|
||||||
llmp_out: LlmpSender<SP>,
|
llmp_out: LlmpSender<SP>,
|
||||||
@ -2050,7 +2050,7 @@ where
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct LlmpBroker<HT, SP>
|
pub struct LlmpBroker<HT, SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// The broker
|
/// The broker
|
||||||
state: LlmpBrokerState<SP>,
|
state: LlmpBrokerState<SP>,
|
||||||
@ -2100,7 +2100,7 @@ impl CtrlHandler for LlmpShutdownSignalHandler {
|
|||||||
/// Llmp hooks
|
/// Llmp hooks
|
||||||
pub trait LlmpHook<SP>
|
pub trait LlmpHook<SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Hook called whenever a new message is received. It receives an llmp message as input, does
|
/// Hook called whenever a new message is received. It receives an llmp message as input, does
|
||||||
/// something with it (read, transform, forward, etc...) and decides to discard it or not.
|
/// something with it (read, transform, forward, etc...) and decides to discard it or not.
|
||||||
@ -2162,7 +2162,7 @@ impl<Head, Tail, SP> LlmpHookTuple<SP> for (Head, Tail)
|
|||||||
where
|
where
|
||||||
Head: LlmpHook<SP>,
|
Head: LlmpHook<SP>,
|
||||||
Tail: LlmpHookTuple<SP>,
|
Tail: LlmpHookTuple<SP>,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
fn on_new_message_all(
|
fn on_new_message_all(
|
||||||
&mut self,
|
&mut self,
|
||||||
@ -2196,7 +2196,7 @@ where
|
|||||||
|
|
||||||
impl<SP> LlmpBroker<(), SP>
|
impl<SP> LlmpBroker<(), SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Add hooks to a hookless [`LlmpBroker`].
|
/// Add hooks to a hookless [`LlmpBroker`].
|
||||||
/// We do not support replacing hooks for now.
|
/// We do not support replacing hooks for now.
|
||||||
@ -2214,7 +2214,7 @@ where
|
|||||||
impl<HT, SP> LlmpBroker<HT, SP>
|
impl<HT, SP> LlmpBroker<HT, SP>
|
||||||
where
|
where
|
||||||
HT: LlmpHookTuple<SP>,
|
HT: LlmpHookTuple<SP>,
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Create and initialize a new [`LlmpBroker`], associated with some hooks.
|
/// Create and initialize a new [`LlmpBroker`], associated with some hooks.
|
||||||
pub fn new(shmem_provider: SP, hooks: HT) -> Result<Self, Error> {
|
pub fn new(shmem_provider: SP, hooks: HT) -> Result<Self, Error> {
|
||||||
@ -2584,7 +2584,7 @@ where
|
|||||||
/// It may intercept messages passing through.
|
/// It may intercept messages passing through.
|
||||||
impl<SP> LlmpBrokerState<SP>
|
impl<SP> LlmpBrokerState<SP>
|
||||||
where
|
where
|
||||||
SP: ShMemProvider + 'static,
|
SP: ShMemProvider,
|
||||||
{
|
{
|
||||||
/// Create and initialize a new [`LlmpBrokerState`], associated with some hooks.
|
/// Create and initialize a new [`LlmpBrokerState`], associated with some hooks.
|
||||||
pub fn new(shmem_provider: SP) -> Result<Self, Error> {
|
pub fn new(shmem_provider: SP) -> Result<Self, Error> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user