mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
fix issue #583: afl-cmin -C incompatibility
This commit is contained in:
parent
c20ba2c2c5
commit
bded51e4ea
14
afl-cmin
14
afl-cmin
@ -133,6 +133,8 @@ BEGIN {
|
|||||||
|
|
||||||
# defaults
|
# defaults
|
||||||
extra_par = ""
|
extra_par = ""
|
||||||
|
AFL_CMIN_CRASHES_ONLY = ""
|
||||||
|
|
||||||
# process options
|
# process options
|
||||||
Opterr = 1 # default is to diagnose
|
Opterr = 1 # default is to diagnose
|
||||||
Optind = 1 # skip ARGV[0]
|
Optind = 1 # skip ARGV[0]
|
||||||
@ -169,7 +171,7 @@ BEGIN {
|
|||||||
continue
|
continue
|
||||||
} else
|
} else
|
||||||
if (_go_c == "C") {
|
if (_go_c == "C") {
|
||||||
ENVIRON["AFL_CMIN_CRASHES_ONLY"] = 1
|
AFL_CMIN_CRASHES_ONLY = "AFL_CMIN_CRASHES_ONLY=1 "
|
||||||
continue
|
continue
|
||||||
} else
|
} else
|
||||||
if (_go_c == "e") {
|
if (_go_c == "e") {
|
||||||
@ -365,10 +367,10 @@ BEGIN {
|
|||||||
print "[*] Testing the target binary..."
|
print "[*] Testing the target binary..."
|
||||||
|
|
||||||
if (!stdin_file) {
|
if (!stdin_file) {
|
||||||
system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/.run_test\" -Z "extra_par" -- \""target_bin"\" "prog_args_string" <\""in_dir"/"first_file"\"")
|
system( "AFL_CMIN_ALLOW_ANY=1 "AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/.run_test\" -Z "extra_par" -- \""target_bin"\" "prog_args_string" <\""in_dir"/"first_file"\"")
|
||||||
} else {
|
} else {
|
||||||
system("cp "in_dir"/"first_file" "stdin_file)
|
system("cp "in_dir"/"first_file" "stdin_file)
|
||||||
system( "AFL_CMIN_ALLOW_ANY=1 \""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/.run_test\" -Z "extra_par" -A \""stdin_file"\" -- \""target_bin"\" "prog_args_string" </dev/null")
|
system( "AFL_CMIN_ALLOW_ANY=1 "AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"/.run_test\" -Z "extra_par" -A \""stdin_file"\" -- \""target_bin"\" "prog_args_string" </dev/null")
|
||||||
}
|
}
|
||||||
|
|
||||||
first_count = 0
|
first_count = 0
|
||||||
@ -399,10 +401,12 @@ BEGIN {
|
|||||||
cur = 0;
|
cur = 0;
|
||||||
if (!stdin_file) {
|
if (!stdin_file) {
|
||||||
print " Processing "in_count" files (forkserver mode)..."
|
print " Processing "in_count" files (forkserver mode)..."
|
||||||
retval = 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)
|
# print AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string
|
||||||
|
retval = system( AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string)
|
||||||
} else {
|
} else {
|
||||||
print " Processing "in_count" files (forkserver mode)..."
|
print " Processing "in_count" files (forkserver mode)..."
|
||||||
retval = 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 AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string" </dev/null"
|
||||||
|
retval = system( AFL_CMIN_CRASHES_ONLY"\""showmap"\" -m "mem_limit" -t "timeout" -o \""trace_dir"\" -Z "extra_par" -i \""in_dir"\" -- \""target_bin"\" "prog_args_string" </dev/null")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retval) {
|
if (retval) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user