diff options
author | Robert Swiecki <robert@swiecki.net> | 2019-02-09 05:49:27 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2019-02-09 05:49:27 +0100 |
commit | c46089c0d34a2535cc3a6e62b050380c2e723894 (patch) | |
tree | 1c81a7115b984c691c3c72e28288d6f223206e6d | |
parent | 0f51c8cf4d41b25e712af683e456e93d96cdac13 (diff) | |
parent | 19f285da054ff0848b64fe6512da78589b01eed5 (diff) | |
download | honggfuzz-c46089c0d34a2535cc3a6e62b050380c2e723894.tar.gz |
Merge branch 'master' of ssh://github.com/google/honggfuzz
-rw-r--r-- | hfuzz_cc/hfuzz-cc.c | 10 | ||||
-rw-r--r-- | mac/arch.c | 4 | ||||
-rw-r--r-- | subproc.c | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/hfuzz_cc/hfuzz-cc.c b/hfuzz_cc/hfuzz-cc.c index 363d5ccc..2c45f0e3 100644 --- a/hfuzz_cc/hfuzz-cc.c +++ b/hfuzz_cc/hfuzz-cc.c @@ -399,14 +399,14 @@ static int ldMode(int argc, char** argv) { args[j++] = getLibHFNetDriverPath(); /* Pull modules defining the following symbols (if they exist) */ -#ifndef _HF_ARCH_DARWIN +#ifdef _HF_ARCH_DARWIN + args[j++] = "-Wl,-U,_LIBHFNETDRIVER_module_main", + args[j++] = "-Wl,-U,_LIBHFUZZ_module_instrument"; + args[j++] = "-Wl,-U,_LIBHFUZZ_module_memorycmp"; +#else /* _HF_ARCH_DARWIN */ args[j++] = "-Wl,-u,LIBHFNETDRIVER_module_main", args[j++] = "-Wl,-u,LIBHFUZZ_module_instrument"; args[j++] = "-Wl,-u,LIBHFUZZ_module_memorycmp"; -#else /* _HF_ARCH_DARWIN */ - args[j++] = "-Wl,-u,_LIBHFNETDRIVER_module_main", - args[j++] = "-Wl,-u,_LIBHFUZZ_module_instrument"; - args[j++] = "-Wl,-u,_LIBHFUZZ_module_memorycmp"; #endif /* _HF_ARCH_DARWIN */ /* Needed by the libhfcommon */ @@ -391,6 +391,7 @@ void arch_reapChild(run_t* run) { } if (ret == -1 && errno == EINTR) { subproc_checkTimeLimit(run); + subproc_checkTermination(run); continue; } if (ret == -1) { @@ -402,8 +403,7 @@ void arch_reapChild(run_t* run) { } char strStatus[4096]; - if (run->global->exe.persistent && ret == run->persistentPid && - (WIFEXITED(status) || WIFSIGNALED(status))) { + if (run->global->exe.persistent && (WIFEXITED(status) || WIFSIGNALED(status))) { if (!fuzz_isTerminating()) { LOG_W("Persistent mode: PID %d exited with status: %s", ret, subproc_StatusToStr(status, strStatus, sizeof(strStatus))); @@ -177,7 +177,9 @@ bool subproc_persistentModeStateMachine(run_t* run) { /* The current persistent round is done */ return true; }; break; - default: { LOG_F("Unknown runState: %d", run->runState); }; break; + default: { + LOG_F("Unknown runState: %d", run->runState); + }; break; } } } |