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

Add option to kill afl-fuzz after a time limit #162

Merged
merged 5 commits into from
Feb 23, 2020

Conversation

divergentdave
Copy link
Member

This PR adds a new option to cargo afl fuzz, --max_total_time, to limit how long afl-fuzz runs for. The new option will enable implementing rust-fuzz/targets#107. When this option is specified, cargo-afl will wait that many seconds and kill afl-fuzz, if it's still running. I had to refactor how command line arguments were passed around, as well, so that this new option didn't get passed to afl.

* Removes ArgRequiredElseHelp, as it is redundant with
SubcommandRequiredElseHelp. (Subcommands count as arguments for the
purposes of ArgRequiredElseHelp.)
* Removes TrailingVarArg from the afl subcommand, because extra
arguments are already handled by its subcommands with AllowLeadingHyphen
and a .multiple(true) argument, or by AllowExternalSubcommands.
* Updates clap to 0.33 to pick up DisableHelpFlags
* Uses DisableHelpFlags in subcommands rather than defining hidden "h"
and "help" arguments.
@frewsxcv
Copy link
Member

hey @divergentdave, feel free to merge + release whenever this is done! i don't have much bandwidth to maintain afl.rs nowadays

@divergentdave
Copy link
Member Author

Will do, I'm pretty happy with it at this point

@divergentdave
Copy link
Member Author

Whoops, actually it looks like I don't have write access, either in this repository or rust-fuzz/targets

@frewsxcv
Copy link
Member

How about now?

@divergentdave divergentdave merged commit cd52c8c into rust-fuzz:master Feb 23, 2020
@divergentdave
Copy link
Member Author

Got it, thanks!

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.

None yet

2 participants