From 539e603206f427ff6549cde661fef0205a4c9034 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 15 Sep 2017 10:15:00 +0200 Subject: syz-manager, syz-fuzzer, executor: ensure that binaries are consistent Check that manager/fuzzer/executor are build on the same git revision, use the same syscall descriptions and the same target arch. Update #336 --- executor/executor.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'executor/executor.cc') diff --git a/executor/executor.cc b/executor/executor.cc index 87a597253..ce8d0ed2f 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -228,8 +228,17 @@ uint64_t read_cover_size(thread_t* th); static uint32_t hash(uint32_t a); static bool dedup(uint32_t sig); +#ifndef GIT_REVISION +#define GIT_REVISION "unknown" +#endif + int main(int argc, char** argv) { + if (argc == 2 && strcmp(argv[1], "version") == 0) { + puts("linux " GOARCH " " SYZ_REVISION " " GIT_REVISION); + return 0; + } + prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0); if (mmap(&input_data[0], kMaxInput, PROT_READ, MAP_PRIVATE | MAP_FIXED, kInFd, 0) != &input_data[0]) fail("mmap of input file failed"); -- cgit mrf-deployment