diff options
-rwxr-xr-x | afl-cmin | 11 | ||||
-rwxr-xr-x | test/test.sh | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/afl-cmin b/afl-cmin index f15e3cb4..0aa702ea 100755 --- a/afl-cmin +++ b/afl-cmin @@ -390,20 +390,15 @@ BEGIN { cur = 0; if (!stdin_file) { - while (cur < in_count) { - fn = infilesSmallToBig[cur] - ++cur; - printf "\r Processing file "cur"/"in_count - system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/"fn"\" -Z "extra_par" -- \""target_bin"\" "prog_args_string" <\""in_dir"/"fn"\"") - } + printf " Processing "in_count" files (forkserver mode)..." + system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string) } else { - printf " Processing "in_count" files (forkserver mode)...\n" + printf " Processing "in_count" files (forkserver mode)..." system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string" </dev/null") } print "" - ####################################################### # STEP 2: register smallest input file for each tuple # # STEP 3: copy that file (at most once) # diff --git a/test/test.sh b/test/test.sh index 69b89661..a2f2ab53 100755 --- a/test/test.sh +++ b/test/test.sh @@ -150,7 +150,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" && { } echo 000000000000000000000000 > in/in2 mkdir -p in2 - ../afl-cmin -i in -o in2 -- ./test-instr.plain @@ >/dev/null + ../afl-cmin -i in -o in2 -- ./test-instr.plain >/dev/null CNT=`ls in2/ | wc -l` case "$CNT" in *1) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;; @@ -256,7 +256,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" || { echo 000000000000000000000000 > in/in2 mkdir -p in2 - ../afl-cmin -i in -o in2 -- ./test-instr.plain @@ >/dev/null + ../afl-cmin -i in -o in2 -- ./test-instr.plain >/dev/null CNT=`ls in2/ | wc -l` case "$CNT" in *1) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;; |