mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 04:18:06 +00:00
fix timeout bug in afl tools
This commit is contained in:
@ -146,6 +146,17 @@ static const u8 count_class_binary[256] = {
|
||||
#undef TIMES8
|
||||
#undef TIMES4
|
||||
|
||||
static void kill_child() {
|
||||
|
||||
if (fsrv->child_pid > 0) {
|
||||
|
||||
kill(fsrv->child_pid, fsrv->kill_signal);
|
||||
fsrv->child_pid = -1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void classify_counts(afl_forkserver_t *fsrv) {
|
||||
|
||||
u8 * mem = fsrv->trace_bits;
|
||||
@ -526,6 +537,8 @@ static void showmap_run_target(afl_forkserver_t *fsrv, char **argv) {
|
||||
|
||||
}
|
||||
|
||||
signal(SIGALRM, kill_child);
|
||||
|
||||
setitimer(ITIMER_REAL, &it, NULL);
|
||||
|
||||
if (waitpid(fsrv->child_pid, &status, 0) <= 0) { FATAL("waitpid() failed"); }
|
||||
|
Reference in New Issue
Block a user