From 5d23ba9171e7afb86a7ac3a5eb89ece1c097d057 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 16 Dec 2016 15:36:29 +0100 Subject: executor: don't fail on ENOMEM --- csource/common.go | 2 +- executor/common.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/csource/common.go b/csource/common.go index e4ed2d577..f63674724 100644 --- a/csource/common.go +++ b/csource/common.go @@ -68,7 +68,7 @@ __attribute__((noreturn)) void fail(const char* msg, ...) vfprintf(stderr, msg, args); va_end(args); fprintf(stderr, " (errno %d)\n", e); - doexit(kFailStatus); + doexit(e == ENOMEM ? kRetryStatus : kFailStatus); } #if defined(SYZ_EXECUTOR) diff --git a/executor/common.h b/executor/common.h index f0e6306e0..6fc798280 100644 --- a/executor/common.h +++ b/executor/common.h @@ -80,7 +80,9 @@ __attribute__((noreturn)) void fail(const char* msg, ...) vfprintf(stderr, msg, args); va_end(args); fprintf(stderr, " (errno %d)\n", e); - doexit(kFailStatus); + // ENOMEM is frequent cause of failures in fuzzing context, + // so handle it here as non-fatal error. + doexit(e == ENOMEM ? kRetryStatus : kFailStatus); } #if defined(SYZ_EXECUTOR) -- cgit mrf-deployment