Skip to content

Commit

Permalink
Better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ifratric committed Mar 29, 2021
1 parent e80c8b9 commit 4e4caaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build32
build64
8 changes: 3 additions & 5 deletions afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -3010,11 +3010,9 @@ static void perform_dry_run(char** argv) {

SAYF("\n" cLRD "[-] " cRST
"The program took more than %u ms to process one of the initial test cases.\n"
" Usually, the right thing to do is to relax the -t option - or to delete it\n"
" altogether and allow the fuzzer to auto-calibrate. That said, if you know\n"
" what you are doing and want to simply skip the unruly test cases, append\n"
" '+' at the end of the value passed to -t ('-t %u+').\n", exec_tmout,
exec_tmout);
" In WinAFL, this error could also mean incorrect instrumentation params.\n"
" Please make sure instrumentation runs correctly using the debug mode\n"
" (see the README) before attempting to run afl-fuzz.\n", exec_tmout);

FATAL("Test case '%s' results in a timeout", fn);

Expand Down
4 changes: 2 additions & 2 deletions winafl.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ event_module_load(void *drcontext, const module_data_t *info, bool loaded)
drsym_lookup_symbol(info->full_path, options.fuzz_method, (size_t *)(&to_wrap), 0);
drsym_exit();
#endif
DR_ASSERT_MSG(to_wrap, "Can't find specified method in fuzz_module");
DR_ASSERT_MSG(to_wrap, "Can't find specified method in target_module");
to_wrap += (size_t)info->start;
}
}
Expand Down Expand Up @@ -971,7 +971,7 @@ options_init(client_id_t id, int argc, const char *argv[])
}

if(options.fuzz_module[0] && (options.fuzz_offset == 0) && (options.fuzz_method[0] == 0)) {
USAGE_CHECK(false, "If fuzz_module is specified, then either fuzz_method or fuzz_offset must be as well");
USAGE_CHECK(false, "If target_module is specified, then either target_method or target_offset must be as well");
}

if(options.num_fuz_args) {
Expand Down

0 comments on commit 4e4caaf

Please sign in to comment.