-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: make the --jobs option actually work for libfuzzer #161
Conversation
(The CI failure with AFL is I think one I already saw, and most likely unrelated to this PR) |
@@ -0,0 +1,400 @@ | |||
diff -ruN libfuzzer/FuzzerCommand.h libfuzzer-new/FuzzerCommand.h |
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.
This patch seems bigger than it needs to be. Can we isolate the change to this single function?
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.
We could, but it would mean that literally every run would need to go through the libtest harness. I thought every runs did, but then saw in the bolero source code that there’s a BOLERO_LIBTEST_HARNESS environment variable, so I considered it’s not actually the case?
(Also, I thought maybe libfuzzer also needs to be able to run executables without going through the libtest harness, eg. in the dataflow things, but I have literally no idea how those works so I wrote the patch only so it doesn’t newly break stuff, at the expense of maybe not fixing them if they were already broken)
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.
That said if bolero fuzzers always run through the libtest harness I could at least slightly simplify the patch :)
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've opened #176 as a more minimal change. The BOLERO_LIBTEST_HARNESS
environment variable is just to detect if we're using libtest or not. If we're not, it would look something like:
fn main() {
bolero::check!().for_each(|_| { });
}
Which means we still go through bolero's harness. But it'll only execute a single harness in this mode.
Superseded by #176 |
Fixes #100.
Required for clusterfuzz support (PR incoming), as clusterfuzz actually uses forks.