Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crates/libafl_frida/src/frida_helper_shutdown_observer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloc::{borrow::Cow, rc::Rc};
use core::{cell::RefCell, fmt};

use libafl::{executors::ExitKind, inputs::HasTargetBytes, observers::Observer};
use libafl::{executors::ExitKind, inputs::Input, observers::Observer};
use libafl_bolts::{Error, Named};
use serde::{
Serialize,
Expand Down Expand Up @@ -36,17 +36,15 @@ where

impl<'a, I, S, RT> Observer<I, S> for FridaHelperObserver<'a, RT>
where
// S: UsesInput,
// S::Input: HasTargetBytes,
RT: FridaRuntimeTuple + 'a,
I: HasTargetBytes,
I: Input,
{
fn post_exec(&mut self, _state: &mut S, input: &I, exit_kind: &ExitKind) -> Result<(), Error> {
fn post_exec(&mut self, _state: &mut S, _input: &I, exit_kind: &ExitKind) -> Result<(), Error> {
if *exit_kind == ExitKind::Crash {
// Custom implementation logic for `FridaInProcessExecutor`
log::error!("Custom post_exec called for FridaInProcessExecutorHelper");
// Add any custom logic specific to FridaInProcessExecutor
return self.helper.borrow_mut().post_exec(&input.target_bytes());
return self.helper.borrow_mut().post_exec(&[]);
}
Ok(())
}
Expand Down
Loading