aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-02-03 19:34:01 +0100
committerDominik Maier <domenukk@gmail.com>2020-02-03 19:34:01 +0100
commite2f6114839960e92bb352bee5099faae99317d62 (patch)
treede1552c3dca98385d88c69f9302b75aa2f68f725
parent9861213ad6449507bb4fa6003361da9e2bc6fd8c (diff)
downloadafl++-e2f6114839960e92bb352bee5099faae99317d62.tar.gz
Revert "adapt to new afl-ahowmap with forkserver mode"
This reverts commit f676e5528ac8a2d454a607fceaa8590f11b9f795.
-rwxr-xr-xafl-cmin9
-rwxr-xr-xtest/test.sh4
2 files changed, 9 insertions, 4 deletions
diff --git a/afl-cmin b/afl-cmin
index 182376c9..9179628e 100755
--- a/afl-cmin
+++ b/afl-cmin
@@ -397,8 +397,13 @@ BEGIN {
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"\"")
}
} else {
- 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")
+ while (cur < in_count) {
+ fn = infilesSmallToBig[cur]
+ ++cur
+ printf "\r Processing file "cur"/"in_count
+ system("cp "in_dir"/"fn" "stdin_file)
+ 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")
+ }
}
print ""
diff --git a/test/test.sh b/test/test.sh
index 69b89661..79cba57a 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" ;;