Skip to content

Commit acaf99c

Browse files
committed
Revert "Revert "adapt to new afl-ahowmap with forkserver mode""
This reverts commit e2f6114.
1 parent e2f6114 commit acaf99c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

afl-cmin

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -397,13 +397,8 @@ BEGIN {
397397
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"\"")
398398
}
399399
} else {
400-
while (cur < in_count) {
401-
fn = infilesSmallToBig[cur]
402-
++cur
403-
printf "\r Processing file "cur"/"in_count
404-
system("cp "in_dir"/"fn" "stdin_file)
405-
system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/"fn"\" -Z "extra_par" -A \""stdin_file"\" -- \""target_bin"\" "prog_args_string" </dev/null")
406-
}
400+
printf " Processing "in_count" files (forkserver mode)..."
401+
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")
407402
}
408403
409404
print ""

test/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" && {
150150
}
151151
echo 000000000000000000000000 > in/in2
152152
mkdir -p in2
153-
../afl-cmin -i in -o in2 -- ./test-instr.plain > /dev/null
153+
../afl-cmin -i in -o in2 -- ./test-instr.plain @@ >/dev/null
154154
CNT=`ls in2/ | wc -l`
155155
case "$CNT" in
156156
*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 && {
256256
test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" || {
257257
echo 000000000000000000000000 > in/in2
258258
mkdir -p in2
259-
../afl-cmin -i in -o in2 -- ./test-instr.plain > /dev/null
259+
../afl-cmin -i in -o in2 -- ./test-instr.plain @@ >/dev/null
260260
CNT=`ls in2/ | wc -l`
261261
case "$CNT" in
262262
*1) $ECHO "$GREEN[+] afl-cmin correctly minimized the number of testcases" ;;

0 commit comments

Comments
 (0)