Skip to content

Commit 13429d2

Browse files
committed
adapt child handling to nawk from *BSD
1 parent 0d4f2da commit 13429d2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

afl-cmin

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,13 @@ BEGIN {
403403
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")
404404
}
405405
406-
if (retval > 127) {
407-
retval = retval - 128
408-
if (retval > 127) {
409-
retval = retval - 128
406+
if (retval) {
407+
print "[!]Exit code != 0 received from afl-showmap, terminating..."
408+
409+
if (!ENVIRON["AFL_KEEP_TRACES"]) {
410+
system("rm -rf "trace_dir" 2>/dev/null")
410411
}
411-
printf "[!]Signal %d received, terminating...\n", retval
412-
exit 1
412+
exit retval
413413
}
414414
415415
#######################################################

0 commit comments

Comments
 (0)