This commit is contained in:
vanhauser-thc
2021-10-24 19:41:06 +02:00
parent a7ee11a174
commit 0f49463ede
3 changed files with 8 additions and 5 deletions

View File

@ -1301,7 +1301,7 @@ fsrv_run_result_t afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
} }
if (!WIFSTOPPED(fsrv->child_status)) { fsrv->child_pid = -1 ; } if (!WIFSTOPPED(fsrv->child_status)) { fsrv->child_pid = -1; }
fsrv->total_execs++; fsrv->total_execs++;

View File

@ -77,7 +77,7 @@ static u32 tcnt, highest; /* tuple content information */
static u32 in_len; /* Input data length */ static u32 in_len; /* Input data length */
static u32 map_size = MAP_SIZE; static u32 map_size = MAP_SIZE, timed_out = 0;
static bool quiet_mode, /* Hide non-essential messages? */ static bool quiet_mode, /* Hide non-essential messages? */
edges_only, /* Ignore hit counts? */ edges_only, /* Ignore hit counts? */
@ -148,6 +148,7 @@ static const u8 count_class_binary[256] = {
static void kill_child() { static void kill_child() {
timed_out = 1;
if (fsrv->child_pid > 0) { if (fsrv->child_pid > 0) {
kill(fsrv->child_pid, fsrv->kill_signal); kill(fsrv->child_pid, fsrv->kill_signal);
@ -373,9 +374,10 @@ static void showmap_run_target_forkserver(afl_forkserver_t *fsrv, u8 *mem,
if (!quiet_mode) { if (!quiet_mode) {
if (fsrv->last_run_timed_out) { if (timed_out || fsrv->last_run_timed_out) {
SAYF(cLRD "\n+++ Program timed off +++\n" cRST); SAYF(cLRD "\n+++ Program timed off +++\n" cRST);
timed_out = 0;
} else if (stop_soon) { } else if (stop_soon) {
@ -581,9 +583,10 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
if (!quiet_mode) { if (!quiet_mode) {
if (fsrv->last_run_timed_out) { if (timed_out || fsrv->last_run_timed_out) {
SAYF(cLRD "\n+++ Program timed off +++\n" cRST); SAYF(cLRD "\n+++ Program timed off +++\n" cRST);
timed_out = 0;
} else if (stop_soon) { } else if (stop_soon) {