-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Make executors and feedbacks easier to use outside of the fuzzing loop (extends #2511) #2637
Conversation
…utside of LibAFLs Fuzzer loop
… nautilus changes
I still don't understand how I can push into other people's branch... |
libafl/src/executors/forkserver.rs
Outdated
@@ -674,6 +675,110 @@ where | |||
pub fn coverage_map_size(&self) -> Option<usize> { | |||
self.map_size | |||
} | |||
|
|||
#[inline] | |||
fn execute_input_tracked(&mut self, state: &mut S, input: &TC::Input) -> Result<ExitKind, Error> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's always the executor's job to increment the exec count. an execution is always "tracked" if "tracked" means incrementing the count
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess you can side-step the counting that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed it to execute_input
and execute_input_uncounted
libafl/src/feedbacks/map.rs
Outdated
manager: &mut EM, | ||
input: &I, | ||
_manager: &mut EM, | ||
_input: &<S as UsesInput>::Input, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use <S as UsesInput>::Input
,
feedbacks is already a 99% Use*
-free module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What else? Do I bring back I
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it... a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I is fine
libafl/src/feedbacks/map.rs
Outdated
_exit_kind: &ExitKind, | ||
) -> Result<bool, Error> | ||
where | ||
EM: EventFirer<State = S>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need this bounds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
libafl/src/feedbacks/list.rs
Outdated
@@ -64,6 +64,47 @@ libafl_bolts::impl_serdeany!( | |||
<u8>,<u16>,<u32>,<u64>,<i8>,<i16>,<i32>,<i64>,<bool>,<char>,<usize> | |||
); | |||
|
|||
impl<T> ListFeedback<T> | |||
where | |||
T: Debug + Serialize + Hash + Eq + DeserializeOwned + Default + Copy + 'static, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think here not all of these bounds are necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like they are
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(removed all of them and needed to add back one by one)
libafl/src/feedbacks/concolic.rs
Outdated
@@ -50,7 +65,7 @@ impl<S> StateInitializer<S> for ConcolicFeedback<'_> {} | |||
|
|||
impl<EM, I, OT, S> Feedback<EM, I, OT, S> for ConcolicFeedback<'_> | |||
where | |||
OT: MatchName, | |||
OT: MatchName + ObserversTuple<I, S>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need observerstuple either
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got rid of one
Hmm |
This PR tries to fix changes since #2511 and merge it