aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorMarco Vanotti <mvanotti@users.noreply.github.com>2019-04-03 16:46:38 -0700
committerJulia Hansbrough <flowerhack@google.com>2019-04-03 16:46:38 -0700
commit6a475fffec57cc3b1e51794c0ebed7d169f12349 (patch)
tree408608a9ca3593d5d30250f41309023f0bd4e260 /executor
parent8658c256227fee97c9b5d2d2ab9a2e469759993d (diff)
executor: move syz_execute_func after os imports. (#1107)
This commit moves the definition of the `syz_execute_func` after the block of code that imports all the OS specific common headers. This is required because after commit dfd3394d42ddd333c68cf355273b312da8c65a51 `syz_execute_func` started using the `NONFAILING` macro, which is defined in those header files for each OS. I also ran `make generate`. TEST=I only tested that the executor works for Fuchsia with: ```shell $ make executor TARGETOS=fuchsia TARGETARCH=amd64 SOURCEDIR=~/fuchsia ```
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/executor/common.h b/executor/common.h
index a0ed0026c..b6035eee1 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -379,6 +379,22 @@ static uint16 csum_inet_digest(struct csum_inet* csum)
}
#endif
+#if GOOS_akaros
+#include "common_akaros.h"
+#elif GOOS_freebsd || GOOS_netbsd || GOOS_openbsd
+#include "common_bsd.h"
+#elif GOOS_fuchsia
+#include "common_fuchsia.h"
+#elif GOOS_linux
+#include "common_linux.h"
+#elif GOOS_test
+#include "common_test.h"
+#elif GOOS_windows
+#include "common_windows.h"
+#else
+#error "unknown OS"
+#endif
+
#if SYZ_EXECUTOR || __NR_syz_execute_func
// syz_execute_func(text ptr[in, text[taget]])
static long syz_execute_func(volatile long text)
@@ -400,22 +416,6 @@ static long syz_execute_func(volatile long text)
}
#endif
-#if GOOS_akaros
-#include "common_akaros.h"
-#elif GOOS_freebsd || GOOS_netbsd || GOOS_openbsd
-#include "common_bsd.h"
-#elif GOOS_fuchsia
-#include "common_fuchsia.h"
-#elif GOOS_linux
-#include "common_linux.h"
-#elif GOOS_test
-#include "common_test.h"
-#elif GOOS_windows
-#include "common_windows.h"
-#else
-#error "unknown OS"
-#endif
-
#if SYZ_THREADED
struct thread_t {
int created, call;