aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorKouame Behouba Manassé <behouba@gmail.com>2022-06-22 17:31:40 +0300
committerDmitry Vyukov <dvyukov@google.com>2022-06-22 17:43:15 +0200
commit23b47762acf36727c78fee4e1b1a8b7031ee3cf6 (patch)
tree052d94c23fe137a57b8cedd1175dac2012f486e6 /executor
parent6299d0cf6d2de64949301de569e0269daac95f05 (diff)
executor: skips declaration of unused function 'doexit_thread' for fuchsia
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h2
-rw-r--r--executor/common_fuchsia.h2
-rw-r--r--executor/executor.cc2
3 files changed, 5 insertions, 1 deletions
diff --git a/executor/common.h b/executor/common.h
index 9cd92983f..e0cfba5ad 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -57,12 +57,14 @@ NORETURN void doexit(int status)
for (;;) {
}
}
+#if !GOOS_fuchsia
NORETURN void doexit_thread(int status)
{
// For BSD systems, _exit seems to do exactly what's needed.
doexit(status);
}
#endif
+#endif
#if SYZ_EXECUTOR || SYZ_MULTI_PROC || SYZ_REPEAT && SYZ_CGROUPS || \
SYZ_NET_DEVICES || __NR_syz_mount_image || __NR_syz_read_part_table || \
diff --git a/executor/common_fuchsia.h b/executor/common_fuchsia.h
index c63ff7bd9..cb29f715e 100644
--- a/executor/common_fuchsia.h
+++ b/executor/common_fuchsia.h
@@ -43,7 +43,7 @@ static void segv_handler(void)
longjmp(segv_env, 1);
}
debug("recover: exiting\n");
- doexit_thread(SIGSEGV);
+ doexit(SIGSEGV);
}
static zx_status_t update_exception_thread_regs(zx_handle_t exception)
diff --git a/executor/executor.cc b/executor/executor.cc
index 081a11f85..7a8eebdab 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -90,7 +90,9 @@ static NORETURN PRINTF(2, 3) void failmsg(const char* err, const char* msg, ...)
// Just exit (e.g. due to temporal ENOMEM error).
static NORETURN PRINTF(1, 2) void exitf(const char* msg, ...);
static NORETURN void doexit(int status);
+#if !GOOS_fuchsia
static NORETURN void doexit_thread(int status);
+#endif
// Print debug output that is visible when running syz-manager/execprog with -debug flag.
// Debug output is supposed to be relatively high-level (syscalls executed, return values, timing, etc)