summaryrefslogtreecommitdiff
path: root/netbsd
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2019-01-30 11:50:18 +0100
committerRobert Swiecki <robert@swiecki.net>2019-01-30 11:50:18 +0100
commit98e2337238c5a49960c88f4c65823f5c088ffc53 (patch)
tree6b3546f71ab0414e2be50c01d6c0276ab048acaa /netbsd
parente2be7a962bad2ab1598b8ae1f55103968096c82c (diff)
downloadhonggfuzz-98e2337238c5a49960c88f4c65823f5c088ffc53.tar.gz
ALL: remove -p (pid), simplify the subproc state machine. NetBSD will stop working for some time, will be fixed in the coming days
Diffstat (limited to 'netbsd')
-rw-r--r--netbsd/arch.c14
-rw-r--r--netbsd/trace.c11
2 files changed, 4 insertions, 21 deletions
diff --git a/netbsd/arch.c b/netbsd/arch.c
index d5b8db58..d4fcb306 100644
--- a/netbsd/arch.c
+++ b/netbsd/arch.c
@@ -62,19 +62,6 @@
extern char** environ;
-static inline bool arch_shouldAttach(run_t* run) {
- if (run->global->exe.persistent && run->netbsd.attachedPid == run->pid) {
- return false;
- }
- if (run->global->netbsd.pid > 0 && run->netbsd.attachedPid == run->global->netbsd.pid) {
- return false;
- }
- if (run->global->socketFuzzer.enabled && run->netbsd.attachedPid == run->pid) {
- return false;
- }
- return true;
-}
-
pid_t arch_fork(run_t* run HF_ATTR_UNUSED) {
pid_t pid = fork();
if (pid == -1) {
@@ -270,7 +257,6 @@ void arch_reapChild(run_t* run) {
}
if (arch_checkWait(run)) {
LOG_D("SocketFuzzer: arch: Crash Identified");
- run->hasCrashed = true;
break;
}
if (run->global->socketFuzzer.enabled) {
diff --git a/netbsd/trace.c b/netbsd/trace.c
index 943ff0f4..65d48c26 100644
--- a/netbsd/trace.c
+++ b/netbsd/trace.c
@@ -138,9 +138,8 @@ static size_t arch_getProcMem(pid_t pid, uint8_t* buf, size_t len, register_t pc
io.piod_addr = buf + bytes_read;
if (ptrace(PT_IO, pid, &io, 0) == -1) {
- PLOG_W(
- "Couldn't read process memory on pid %d, "
- "piod_op: %d offs: %p addr: %p piod_len: %zu",
+ PLOG_W("Couldn't read process memory on pid %d, "
+ "piod_op: %d offs: %p addr: %p piod_len: %zu",
pid, io.piod_op, io.piod_offs, io.piod_addr, io.piod_len);
break;
}
@@ -491,7 +490,6 @@ static void arch_traceSaveData(run_t* run, pid_t pid) {
/* Target crashed (no duplicate detection yet) */
if (run->global->socketFuzzer.enabled) {
LOG_D("SocketFuzzer: trace: Crash Identified");
- run->hasCrashed = true;
}
if (files_exists(run->crashFileName)) {
@@ -867,9 +865,8 @@ static void arch_traceEvent(run_t* run HF_ATTR_UNUSED, pid_t pid) {
"PID: %d unexpected lwp trap (TRAP_LWP) : exit (PTRACE_LWP_EXIT)", pid);
break;
default:
- LOG_D(
- "PID: %d unknown child/lwp trap (TRAP_LWP/TRAP_CHLD) : unknown "
- "pe_report_event=%d",
+ LOG_D("PID: %d unknown child/lwp trap (TRAP_LWP/TRAP_CHLD) : unknown "
+ "pe_report_event=%d",
pid, state.pe_report_event);
break;
}