fix missing out_fd for cmplog forkserver
MODIFY
src/afl-forkserver.c
src/afl-forkserver.c
@@ -88,6 +88,7 @@ void afl_fsrv_init(afl_forkserver_t *fsrv) {
void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) {
fsrv_to->use_stdin = from->use_stdin;
+ fsrv_to->out_fd = from->out_fd;
fsrv_to->dev_null_fd = from->dev_null_fd;
fsrv_to->exec_tmout = from->exec_tmout;
fsrv_to->mem_limit = from->mem_limit;
@@ -98,7 +99,6 @@ void afl_fsrv_init_dup(afl_forkserver_t *fsrv_to, afl_forkserver_t *from) {
#endif
// These are forkserver specific.
- fsrv_to->out_fd = -1;
fsrv_to->out_dir_fd = -1;
fsrv_to->child_pid = -1;
fsrv_to->use_fauxsrv = 0;

MODIFY
test/test.sh
test/test.sh
@@ -671,7 +671,7 @@ test -e ../afl-qemu-trace && {
test -e test-instr -a -e test-compcov && {
{
mkdir -p in
- echo 0 > in/in
+ echo 00000 > in/in
$ECHO "$GREY[*] running afl-fuzz for qemu_mode, this will take approx 10 seconds"
{
../afl-fuzz -m ${MEM_LIMIT} -V10 -Q -i in -o out -- ./test-instr >>errors 2>&1

fix missing out_fd for cmplog forkserver