From fc86fd34ffcf4acd9e61dda1274ce75d9e085a9e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 18 Dec 2018 05:27:12 -0500 Subject: [PATCH] tcg/i386: Return false on failure from patch_reloc Backports commit bec3afd5fc6ab0b6e9d8a01575d58db8d1ad82ce from qemu --- qemu/tcg/i386/tcg-target.inc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/tcg/i386/tcg-target.inc.c b/qemu/tcg/i386/tcg-target.inc.c index c42fb963..edc80b7c 100644 --- a/qemu/tcg/i386/tcg-target.inc.c +++ b/qemu/tcg/i386/tcg-target.inc.c @@ -182,7 +182,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, case R_386_PC32: value -= (uintptr_t)code_ptr; if (value != (int32_t)value) { - tcg_abort(); + return false; } /* FALLTHRU */ case R_386_32: @@ -191,7 +191,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, case R_386_PC8: value -= (uintptr_t)code_ptr; if (value != (int8_t)value) { - tcg_abort(); + return false; } tcg_patch8(code_ptr, value); break;