Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ static u8 skip_deterministic, /* Skip deterministic stages? */
no_var_check, /* Don't detect variable behavior */
bitmap_changed = 1, /* Time to update bitmap? */
qemu_mode, /* Running in QEMU mode? */
quit_mode, /* Running in 'force quit' mode? */
skip_requested, /* Skip request, via SIGUSR1 */
run_over10m; /* Run time over 10 minutes? */

Expand Down Expand Up @@ -3098,6 +3099,9 @@ static void perform_dry_run(char** argv) {

case FAULT_HANG:

if (quit_mode)
break;

if (timeout_given) {

/* The -t nn+ syntax in the command line sets timeout_given to '2' and
Expand Down Expand Up @@ -7308,6 +7312,7 @@ static void usage(u8* argv0) {

" -d - quick & dirty mode (skips deterministic steps)\n"
" -n - fuzz without instrumentation (dumb mode)\n"
" -q - fuzz programs that do not quit by themselves (quit mode)\n"
" -x dir - optional fuzzer dictionary (see README)\n\n"

"Other stuff:\n\n"
Expand Down Expand Up @@ -7933,7 +7938,7 @@ int main(int argc, char** argv) {

doc_path = access(DOC_PATH, F_OK) ? "docs" : DOC_PATH;

while ((opt = getopt(argc, argv, "+i:o:f:m:t:T:dnCB:S:M:x:QN:D:L")) > 0) {
while ((opt = getopt(argc, argv, "+i:o:f:m:t:T:dnCB:S:M:x:qQN:D:L")) > 0) {

switch (opt) {

Expand Down Expand Up @@ -8074,6 +8079,12 @@ int main(int argc, char** argv) {
use_banner = optarg;
break;

case 'q': /* force quit mode */

quit_mode = 1;

break;

case 'Q':

if (qemu_mode) FATAL("Multiple -Q options not supported");
Expand Down