From 0c5edf418028236ec3392ab1cd24f85378569f5d Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Dec 2017 08:41:07 +0100 Subject: 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. --- executor/executor_linux.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'executor/executor_linux.cc') 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. -- cgit mrf-deployment