-
Notifications
You must be signed in to change notification settings - Fork 21
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
Generalize the project to other fuzzers: AFL and Honggfuzz #102
Conversation
This reverts commit ffd28a0232c22644b8478bcf095ced6fa3efbb28.
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.
Wow this looks super cool!
notifications: | ||
email: | ||
recipients: | ||
- paul.grandperrin@gmail.com |
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 really want to get these mails? :)
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.
maybe not 😄 , I'll see if it's too much!
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.
Okay, I'm pretty sure this settings means you and you alone will be responsible for our CI, though 😄
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 won't hesitate to ping people if needed ;-)
|
||
sh -ve gen-targets-src.sh | ||
|
||
cargo install afl honggfuzz --force --verbose |
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.
not sure how long this takes, but you might want to add cache: cargo
to travis.yml and check if the latest version is already installed here to speed it up (can totally be in another PR though)
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 didn't know about cache: cargo
. Is it really useful when always running on the latest nightly?
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.
Hm, good point. It'll probably only cache the crate sources. Not sure how much time the downloads take
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.
Since the crates are downloaded from git, I don't think it'll change a lot but I guess there are no drawbacks in our use-case, right?
common/src/lib.rs
Outdated
extern crate zip; | ||
extern crate zopfli; | ||
|
||
// many function bodies are copied from https://github.com/rust-fuzz/targets |
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.
will no longer a helpful comment i guess :)
common/src/lib.rs
Outdated
|
||
// many function bodies are copied from https://github.com/rust-fuzz/targets | ||
|
||
#[inline(always)] |
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.
not sure how much I like a huge file with ALL the fuzzer functions and then also have them be #[inline(always)]
… but I can't think of a good pragmatic alternative, so let's leave it like this for now
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.
Exactly same feeling here.
I haven't figured out what would be the best solution but I'm planning to do something about it.
I think it's ok for now.
Just ran the continuous script on may macbook for a bit and after a while it failed to compile targets because cc failed with "posix_spawn failed: Resource temporarily unavailable". This is apparently because of a hard limit of processes per user was reached. Fuzz targets don't seem to be properly killed. (I was able to solve this temporarily with |
Oh, that's unexpected!
If you have Linux natively installed your apple box, I would interrested in a fair benchmark ;-) |
I cannot repro on Linux. |
So, at some point it seems to stop killing processes:
Which is pretty weird, but should not block this PR -- it's a new feature and if we have to tell people to be careful, then so be it. |
love this, thanks so much @PaulGrandperrin! as per the previous convo, looks like there might a bug to work out, but agreed it shouldn't block this. 🎉 bors r+ |
102: Generalize the project to other fuzzers: AFL and Honggfuzz r=frewsxcv a=PaulGrandperrin This is far from perfect (all targets are compiled at once) but it works and it's easy to work with (look at and add targets). All the targets have been ported with only 1 or 2 exceptions that were broken and not easily fixable. All seeds have been moved over too. I added a few more targets like `url` and `proc_macro2`. closes #100 closes #98 closes #66 I guess closes #34 not relevant anymore closes #73 Co-authored-by: Paul Grandperrin <paul.grandperrin@gmail.com>
Build succeeded |
This is far from perfect (all targets are compiled at once) but it works and it's easy to work with (look at and add targets).
All the targets have been ported with only 1 or 2 exceptions that were broken and not easily fixable.
All seeds have been moved over too.
I added a few more targets like
url
andproc_macro2
.closes #100
closes #98
closes #66 I guess
closes #34 not relevant anymore
closes #73