mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
Merge pull request #1570 from edmcman/showmap-timeout
Fix -t none in afl-showmap
This commit is contained in:
@ -515,12 +515,11 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
|
|||||||
it.it_value.tv_sec = (fsrv->exec_tmout / 1000);
|
it.it_value.tv_sec = (fsrv->exec_tmout / 1000);
|
||||||
it.it_value.tv_usec = (fsrv->exec_tmout % 1000) * 1000;
|
it.it_value.tv_usec = (fsrv->exec_tmout % 1000) * 1000;
|
||||||
|
|
||||||
|
signal(SIGALRM, kill_child);
|
||||||
|
|
||||||
|
setitimer(ITIMER_REAL, &it, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
signal(SIGALRM, kill_child);
|
|
||||||
|
|
||||||
setitimer(ITIMER_REAL, &it, NULL);
|
|
||||||
|
|
||||||
if (waitpid(fsrv->child_pid, &status, 0) <= 0) { FATAL("waitpid() failed"); }
|
if (waitpid(fsrv->child_pid, &status, 0) <= 0) { FATAL("waitpid() failed"); }
|
||||||
|
|
||||||
fsrv->child_pid = 0;
|
fsrv->child_pid = 0;
|
||||||
@ -1016,6 +1015,11 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// The forkserver code does not have a way to completely
|
||||||
|
// disable the timeout, so we'll use a very, very long
|
||||||
|
// timeout instead.
|
||||||
|
fsrv->exec_tmout = 120 * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user