adapt child handling to nawk from *BSD
MODIFY
afl-cmin
afl-cmin
@@ -403,13 +403,13 @@ BEGIN {
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")
}
- if (retval > 127) {
- retval = retval - 128
- if (retval > 127) {
- retval = retval - 128
+ if (retval) {
+ print "[!]Exit code != 0 received from afl-showmap, terminating..."
+
+ if (!ENVIRON["AFL_KEEP_TRACES"]) {
+ system("rm -rf "trace_dir" 2>/dev/null")
}
- printf "[!]Signal %d received, terminating...\n", retval
- exit 1
+ exit retval
}
#######################################################

adapt child handling to nawk from *BSD