aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-12-27 08:41:07 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-12-27 09:18:26 +0100
commit0c5edf418028236ec3392ab1cd24f85378569f5d (patch)
tree533786924099c0b3ac44dc02f8b53390b44499f9 /executor
parent17f5c9e05f9ce01c0dd4b583d4737119c246296f (diff)
executor: fix reply status on loop kills
We use exitf on loop failures, anbd exitf is retry-able. However, we use different status when replying to ipc, and that different status is what ipc actually uses. Use kRetryStatus status in case on unexpected loop failures.
Diffstat (limited to 'executor')
-rw-r--r--executor/executor_linux.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/executor/executor_linux.cc b/executor/executor_linux.cc
index d66be92d2..b71290825 100644
--- a/executor/executor_linux.cc
+++ b/executor/executor_linux.cc
@@ -92,7 +92,8 @@ int main(int argc, char** argv)
while (waitpid(-1, &status, __WALL) != pid) {
}
status = WEXITSTATUS(status);
- if (status == 0)
+ // Other statuses happen when fuzzer processes manages to kill loop.
+ if (status != kFailStatus && status != kErrorStatus)
status = kRetryStatus;
// If an external sandbox process wraps executor, the out pipe will be closed
// before the sandbox process exits this will make ipc package kill the sandbox.