diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 10:15:00 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 16:02:37 +0200 |
| commit | 539e603206f427ff6549cde661fef0205a4c9034 (patch) | |
| tree | de4cd1db71fc293582ad495f4d8cc16f196c6827 /executor/executor.cc | |
| parent | 19f9bc13d374058b83b2712f119bb42559b35c0c (diff) | |
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
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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"); |
