mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 02:28:09 +00:00
kill targets on exit
This commit is contained in:
@ -19,6 +19,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
- switched murmur2 hashing and random() for xxh3 and xoshiro256**,
|
- switched murmur2 hashing and random() for xxh3 and xoshiro256**,
|
||||||
resulting in an up to 5.5% speed increase
|
resulting in an up to 5.5% speed increase
|
||||||
- Resizing the window does not crash afl-fuzz anymore
|
- Resizing the window does not crash afl-fuzz anymore
|
||||||
|
- Ensure that the targets are killed on exit
|
||||||
- fix/update to MOpt (thanks to arnow117)
|
- fix/update to MOpt (thanks to arnow117)
|
||||||
- added MOpt dictionary support from repo
|
- added MOpt dictionary support from repo
|
||||||
- llvm_mode:
|
- llvm_mode:
|
||||||
|
@ -466,6 +466,13 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
|
|
||||||
/* PARENT PROCESS */
|
/* PARENT PROCESS */
|
||||||
|
|
||||||
|
char pid_buf[16];
|
||||||
|
sprintf(pid_buf, "%d", fsrv->fsrv_pid);
|
||||||
|
if (fsrv->cmplog_binary)
|
||||||
|
setenv("__AFL_TARGET_PID2", pid_buf, 1);
|
||||||
|
else
|
||||||
|
setenv("__AFL_TARGET_PID1", pid_buf, 1);
|
||||||
|
|
||||||
/* Close the unneeded endpoints. */
|
/* Close the unneeded endpoints. */
|
||||||
|
|
||||||
close(ctl_pipe[0]);
|
close(ctl_pipe[0]);
|
||||||
|
@ -31,6 +31,23 @@
|
|||||||
extern u64 time_spent_working;
|
extern u64 time_spent_working;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void at_exit() {
|
||||||
|
|
||||||
|
int i;
|
||||||
|
char *ptr = getenv("__AFL_TARGET_PID1");
|
||||||
|
|
||||||
|
if (ptr && *ptr && (i = atoi(ptr)) > 0)
|
||||||
|
kill(i, SIGKILL);
|
||||||
|
|
||||||
|
ptr = getenv("__AFL_TARGET_PID2");
|
||||||
|
|
||||||
|
if (ptr && *ptr && (i = atoi(ptr)) > 0)
|
||||||
|
kill(i, SIGKILL);
|
||||||
|
|
||||||
|
// anything else? shared memory?
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static u8 *get_libradamsa_path(u8 *own_loc) {
|
static u8 *get_libradamsa_path(u8 *own_loc) {
|
||||||
|
|
||||||
u8 *tmp, *cp, *rsl, *own_copy;
|
u8 *tmp, *cp, *rsl, *own_copy;
|
||||||
@ -1242,6 +1259,8 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
OKF("Cmplog forkserver successfully started");
|
OKF("Cmplog forkserver successfully started");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
atexit(at_exit);
|
||||||
|
|
||||||
perform_dry_run(afl);
|
perform_dry_run(afl);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user