File xen.fuzz-_FORTIFY_SOURCE.patch of Package xen.13143
From: Olaf Hering <olaf@aepfle.de>
Date: Mon, 18 Jun 2018 14:43:58 +0200
Subject: fuzz _FORTIFY_SOURCE
[ 78s] fuzz-emul.c: In function 'input_read':
[ 78s] /usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline 'memcpy': target specific option mismatch
[ 78s] from fuzz-emul.c:1:
[ 78s] /usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline 'memcpy': target specific option mismatch
[ 78s] x86_emulate/x86_emulate.c: In function 'protmode_load_seg':
[ 78s] /usr/include/bits/string_fortified.h:59:1: error: inlining failed in call to always_inline 'memset': target specific option mismatch
[ 78s] wrappers.c: In function 'emul_memcpy':
[ 78s] /usr/include/bits/string_fortified.h:31:1: error: inlining failed in call to always_inline 'memcpy': target specific option mismatch
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
stubdom/Makefile | 1 +
tools/fuzz/x86_instruction_emulator/Makefile | 1 +
2 files changed, 2 insertions(+)
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -13,6 +13,7 @@ export stubdom=y
export debug=y
# Moved from config/StdGNU.mk
CFLAGS += -O1 -fno-omit-frame-pointer
+CFLAGS += -U_FORTIFY_SOURCE
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
ifeq ($(wildcard $(MINI_OS)/Config.mk),)
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -22,6 +22,7 @@ x86-emulate.c x86-emulate.h wrappers.c: %:
[ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -I.
+CFLAGS += -U_FORTIFY_SOURCE
GCOV_FLAGS := --coverage
%-cov.o: %.c