From 3704c60135f96c02079274dad1a00b2dc3f846c9 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 19 Oct 2017 11:06:05 +0200 Subject: executor: fix build breakages due to doexit Some standard libraries contain "using ::exit;", which breaks with the current redefinition of exit. --- executor/common.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'executor/common.h') diff --git a/executor/common.h b/executor/common.h index 980ea74b7..b7a0706fd 100644 --- a/executor/common.h +++ b/executor/common.h @@ -22,6 +22,14 @@ #include #endif +#if defined(SYZ_EXECUTOR) +// exit/_exit do not necessary work (e.g. if fuzzer sets seccomp filter that prohibits exit_group). +// Use doexit instead. We must redefine exit to something that exists in stdlib, +// because some standard libraries contain "using ::exit;", but has different signature. +#define exit vsnprintf +#define _exit vsnprintf +#endif + #if defined(SYZ_EXECUTOR) #if defined(__GNUC__) #define SYSCALLAPI -- cgit mrf-deployment