-
Notifications
You must be signed in to change notification settings - Fork 107
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
Can't fuzz a crate that catches panic #150
Comments
Doing something like this fixes it: #[macro_use]
extern crate afl;
fn main() {
fuzz!(|data: &[u8]| {
// Remove the panic hook so we can actually catch panic
std::panic::set_hook(Box::new(|_| {} ));
// Fuzz code that catches panics here
});
} It seems wasteful to be changing the hook on every call though. Would you take a PR to add an option to |
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150 Fixes rust-fuzz#152
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150 Fixes rust-fuzz#152
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150
Never mind, still present. Now I'm puzzled how it compiled once but doesn't seem to again? |
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes rust-fuzz#150
If your fuzzing code catches panics somewhere inside its code the hook would turn those into crashes. Allow disabling the hook by adding a fuzz_nohook! macro. Fixes #150
My rawloader crate catches panic on file decode to just ignore broken files without having to rewrite all the bounds checks that rust already provides. I'd still like to fuzz it to catch hangs and other causes of crashes. It doesn't seem to be possible right now though because all panics are turned into aborts. Is there a way to avoid that?
The text was updated successfully, but these errors were encountered: