about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-18 11:30:15 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-18 11:30:15 +0100
commit0a5929cc854359dbd31c7b4747427752fa06bc74 (patch)
tree77caf9af973d70b567a0f4ff92d1fc885746a307
parent2c24cb63a67837e8477f09691a09219b6fb7e336 (diff)
downloadafl++-0a5929cc854359dbd31c7b4747427752fa06bc74.tar.gz
better -h for cmplog
-rw-r--r--src/afl-fuzz.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 0609061c..eeb660f7 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -100,7 +100,6 @@ static void usage(u8* argv0) {
       "  -f file       - location read by the fuzzed program (stdin)\n"
       "  -t msec       - timeout for each run (auto-scaled, 50-%d ms)\n"
       "  -m megs       - memory limit for child process (%d MB)\n"
-      "  -c program    - enable CmpLog by specifying a binary compiled for it\n"
       "  -Q            - use binary-only instrumentation (QEMU mode)\n"
       "  -U            - use unicorn-based instrumentation (Unicorn mode)\n"
       "  -W            - use qemu-based instrumentation with Wine (Wine "
@@ -113,7 +112,9 @@ static void usage(u8* argv0) {
       "entering the\n"
       "                  pacemaker mode (minutes of no new paths, 0 = "
       "immediately).\n"
-      "                  a recommended value is 10-60. see docs/README.MOpt\n\n"
+      "                  a recommended value is 10-60. see docs/README.MOpt\n"
+      "  -c program    - enable CmpLog by specifying a binary compiled for it.\n"
+      "                  if using QEMU, just use -c 0.\n\n"
 
       "Fuzzing behavior settings:\n"
       "  -N            - do not unlink the fuzzing input file\n"
@@ -881,7 +882,12 @@ int main(int argc, char** argv, char** envp) {
 
   if (!out_file) setup_stdio_file();
 
-  if (cmplog_binary) check_binary(cmplog_binary);
+  if (cmplog_binary) {
+    if (unicorn_mode)
+      FATAL("CmpLog and Unicorn mode are not compatible at the moment, sorry");
+    if (!qemu_mode)
+      check_binary(cmplog_binary);
+  }
   check_binary(argv[optind]);
 
   start_time = get_cur_time();