diff options
Diffstat (limited to 'executor/executor_windows.cc')
| -rw-r--r-- | executor/executor_windows.cc | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/executor/executor_windows.cc b/executor/executor_windows.cc index 862621951..0124aa0d9 100644 --- a/executor/executor_windows.cc +++ b/executor/executor_windows.cc @@ -14,39 +14,18 @@ #include "syscalls_windows.h" -char input_data[kMaxInput]; uint32_t output; int main(int argc, char** argv) { if (argc == 2 && strcmp(argv[1], "version") == 0) { - puts("linux " GOARCH " " SYZ_REVISION " " GIT_REVISION); + puts(GOOS " " GOARCH " " SYZ_REVISION " " GIT_REVISION); return 0; } - int pos = 0; - for (;;) { - int rv = _read(0, input_data + pos, sizeof(input_data) - pos); - if (rv < 0) - fail("read failed"); - if (rv == 0) - break; - pos += rv; - } - if (pos < 24) - fail("truncated input"); - - uint64_t flags = *(uint64_t*)input_data; - flag_debug = flags & (1 << 0); - flag_threaded = flags & (1 << 2); - flag_collide = flags & (1 << 3); - if (!flag_threaded) - flag_collide = false; - uint64_t executor_pid = *((uint64_t*)input_data + 2); - debug("input %d, threaded=%d collide=%d pid=%llu\n", - pos, flag_threaded, flag_collide, executor_pid); - - execute_one(((uint64_t*)input_data) + 3); + setup_control_pipes(); + receive_execute(); + execute_one(); return 0; } |
