diff --git a/libafl/src/events/llmp/restarting.rs b/libafl/src/events/llmp/restarting.rs index 6addd8e6c4..370b4ca39a 100644 --- a/libafl/src/events/llmp/restarting.rs +++ b/libafl/src/events/llmp/restarting.rs @@ -3,7 +3,7 @@ //! When the target crashes, a watch process (the parent) will //! restart/refork it. -use alloc::vec::Vec; +use alloc::{boxed::Box, vec::Vec}; #[cfg(all(unix, not(miri), feature = "std"))] use core::ptr::addr_of_mut; #[cfg(feature = "std")] @@ -36,7 +36,7 @@ use serde::{Deserialize, Serialize}; use typed_builder::TypedBuilder; #[cfg(feature = "std")] -use crate::events::AdaptiveSerializer; +use crate::events::{AdaptiveSerializer, CustomBufEventResult, HasCustomBufHandlers}; #[cfg(all(unix, feature = "std", not(miri)))] use crate::events::EVENTMGR_SIGHANDLER_STATE; use crate::{ @@ -251,6 +251,20 @@ where } } +#[cfg(feature = "std")] +impl HasCustomBufHandlers for LlmpRestartingEventManager +where + S: State, + SP: ShMemProvider, +{ + fn add_custom_buf_handler( + &mut self, + handler: Box Result>, + ) { + self.llmp_mgr.add_custom_buf_handler(handler); + } +} + /// The llmp connection from the actual fuzzer to the process supervising it const _ENV_FUZZER_SENDER: &str = "_AFL_ENV_FUZZER_SENDER"; const _ENV_FUZZER_RECEIVER: &str = "_AFL_ENV_FUZZER_RECEIVER";