Skip to content
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

Merged
merged 28 commits into from
Oct 29, 2024

Conversation

domenukk
Copy link
Member

This PR tries to fix changes since #2511 and merge it

@domenukk
Copy link
Member Author

I still don't understand how I can push into other people's branch...

@@ -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>
Copy link
Member

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?

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member Author

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

manager: &mut EM,
input: &I,
_manager: &mut EM,
_input: &<S as UsesInput>::Input,
Copy link
Member

@tokatoka tokatoka Oct 28, 2024

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

Copy link
Member Author

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it... a bit?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I is fine

_exit_kind: &ExitKind,
) -> Result<bool, Error>
where
EM: EventFirer<State = S>,
Copy link
Member

@tokatoka tokatoka Oct 28, 2024

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point

@@ -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,
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like they are

Copy link
Member Author

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)

@@ -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>,
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do :/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got rid of one

@domenukk
Copy link
Member Author

Hmm fuzzers/structure_aware/forkserver_simple_nautilus is broken with this dude

@domenukk domenukk merged commit 6eb2daf into main Oct 29, 2024
88 of 99 checks passed
@domenukk domenukk deleted the usable_components branch October 29, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants