From 4e4caaf9ca3c6d79c8af7a0739f1a44807f56ce0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Mar 2021 12:53:18 +0200 Subject: [PATCH] Better error messages --- .gitignore | 2 ++ afl-fuzz.c | 8 +++----- winafl.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..cf62bec9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build32 +build64 diff --git a/afl-fuzz.c b/afl-fuzz.c index dbf31c89..6efd560c 100644 --- a/afl-fuzz.c +++ b/afl-fuzz.c @@ -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); diff --git a/winafl.c b/winafl.c index 77ac932c..80975acb 100644 --- a/winafl.c +++ b/winafl.c @@ -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; } } @@ -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) {