diff options
author | van Hauser <vh@thc.org> | 2020-04-11 08:02:54 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-04-11 08:02:54 +0200 |
commit | 32ba60185eba8a3ae8eeba0b5830d1bb43e38473 (patch) | |
tree | 3b50122786758210b6f309d5facb4a599b814d7a /src/afl-fuzz-run.c | |
parent | 8bcfba8231aecc11a3815c74b6c53c86f418ece1 (diff) | |
download | afl++-32ba60185eba8a3ae8eeba0b5830d1bb43e38473.tar.gz |
more refactoring and update changelog
Diffstat (limited to 'src/afl-fuzz-run.c')
-rw-r--r-- | src/afl-fuzz-run.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/afl-fuzz-run.c b/src/afl-fuzz-run.c index 3a178e87..4c98d788 100644 --- a/src/afl-fuzz-run.c +++ b/src/afl-fuzz-run.c @@ -69,8 +69,7 @@ u8 run_target(afl_state_t *afl, afl_forkserver_t *fsrv, u32 timeout) { if (fsrv->child_pid <= 0) FATAL("Fork server is misbehaving (OOM?)"); - exec_ms = - read_timed(fsrv->fsrv_st_fd, &status, 4, timeout, &afl->stop_soon); + exec_ms = read_timed(fsrv->fsrv_st_fd, &status, 4, timeout, &afl->stop_soon); if (exec_ms > timeout) { @@ -312,10 +311,17 @@ u8 calibrate_case(afl_state_t *afl, struct queue_entry *q, u8 *use_mem, count its spin-up time toward binary calibration. */ if (!afl->fsrv.fsrv_pid) { - if (afl->shm.cmplog_mode && afl->fsrv.init_child_func != cmplog_exec_child) { + + if (afl->shm.cmplog_mode && + afl->fsrv.init_child_func != cmplog_exec_child) { + FATAL("BUG in afl-fuzz detected. Cmplog mode not set correctly."); + } - afl_fsrv_start(&afl->fsrv, afl->argv, &afl->stop_soon, afl->afl_env.afl_debug_child_output); + + afl_fsrv_start(&afl->fsrv, afl->argv, &afl->stop_soon, + afl->afl_env.afl_debug_child_output); + } if (q->exec_cksum) |