diff options
author | Robert Swiecki <robert@swiecki.net> | 2018-01-14 21:09:50 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2018-01-14 21:09:50 +0100 |
commit | 44acf6ea81bbc00a9caa33b3a036e8f6da5ae94e (patch) | |
tree | 36fc4cc47610ee86a4e025688591a39c85699e79 /subproc.c | |
parent | 04f4b4b591140a2b294646ecff423d0e6d86abc5 (diff) | |
download | honggfuzz-44acf6ea81bbc00a9caa33b3a036e8f6da5ae94e.tar.gz |
msyn() the dynamic file before running fuzzed process in non-persistent mode
Diffstat (limited to 'subproc.c')
-rw-r--r-- | subproc.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/mman.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/time.h> @@ -326,6 +327,10 @@ bool subproc_Run(run_t* run) { arch_prepareParent(run); + if (!run->global->persistent && msync(run->dynamicFile, run->dynamicFileSz, MS_SYNC) == -1) { + LOG_W("Couldn't msync(dynamicFile, sz=%zu)", run->dynamicFileSz); + } + if (run->global->persistent && !subproc_persistentSendFileIndicator(run)) { LOG_W("Could not send file size to the persistent process"); kill(run->persistentPid, SIGKILL); |