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

Support on_crash & on_timeout callbacks for libafl_qemu modules #2620

Merged
merged 8 commits into from
Oct 21, 2024

Conversation

rmalmain
Copy link
Collaborator

mostly useful for drcov stuff for now.
should solve #1150

@domenukk
Copy link
Member

Amazeballs

self.write();
}

fn on_crash(&mut self) {
Copy link
Member

Choose a reason for hiding this comment

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

Only question is, should the callbacks have access to input, state etc.?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i started to implement this with these things as parameters, but i realized that for now it doesn't seem useful.
so i was planning to add these if it is needed later on

@tokatoka
Copy link
Member

there should be a comment stating that "Never do something that could crash inside crash handler". I've at least seen twice when such mistake is made into libafl.

@rmalmain
Copy link
Collaborator Author

yes that's right, i'll add this

@rmalmain
Copy link
Collaborator Author

i'll even make them unsafe, it's easy to mess up in there

@domenukk
Copy link
Member

Merge?

@rmalmain rmalmain merged commit d96d833 into main Oct 21, 2024
98 checks passed
@rmalmain rmalmain deleted the crash_module_hooks branch October 21, 2024 15:59
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