aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-10-04 11:57:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-10-05 14:22:22 +0200
commitc81b0ef31cdd4c2449a750a060085bab972bbd05 (patch)
tree589c3c1b5ca6a82ca71680b5ff1cedabd096c369 /executor
parent477d9f8dc089b54271fc4418c66cda418c9f25ff (diff)
executor: work around clang-format issue
clang-format mis-formats #elif: https://bugs.llvm.org/show_bug.cgi?id=48664 and then clang fails with: error: misleading indentation; statement is not part of the previous 'if' Split #elif into nested #if/else.
Diffstat (limited to 'executor')
-rw-r--r--executor/common.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/executor/common.h b/executor/common.h
index d9367fd38..7a36cfe8d 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -661,7 +661,8 @@ static void loop(void)
if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid)
break;
sleep_ms(1);
-#if SYZ_EXECUTOR && SYZ_EXECUTOR_USES_SHMEM
+#if SYZ_EXECUTOR
+#if SYZ_EXECUTOR_USES_SHMEM
// Even though the test process executes exit at the end
// and execution time of each syscall is bounded by syscall_timeout_ms (~50ms),
// this backup watchdog is necessary and its performance is important.
@@ -684,12 +685,13 @@ static void loop(void)
if ((now - start < program_timeout_ms) &&
(now - start < min_timeout_ms || now - last_executed < inactive_timeout_ms))
continue;
-#elif SYZ_EXECUTOR
+#else
if (current_time_ms() - start < program_timeout_ms)
continue;
+#endif
#else
- if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/)
- continue;
+ if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/)
+ continue;
#endif
debug("killing hanging pid %d\n", pid);
kill_and_wait(pid, &status);