From patchwork Mon Nov 12 20:49:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 150875 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3595509ljp; Mon, 12 Nov 2018 12:50:20 -0800 (PST) X-Google-Smtp-Source: AJdET5fXWWdUoIi2IvyCL20QM/E/+Hq9ebKI5AtnB7YjQXiPlCkntCSAti3GtLArj/tjR4Rb/F8h X-Received: by 2002:ac8:1a77:: with SMTP id q52mr2341140qtk.329.1542055820274; Mon, 12 Nov 2018 12:50:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542055820; cv=none; d=google.com; s=arc-20160816; b=OYkHAOSXbzmNdTCk7e5Okkx8n02uLkySqALp4rYRomOAVbdlHjXNtjbjdCScO5eNr4 V/papu1xnxd7ZL4mkLSled2ZPvxhb21vQzLu/U028mG3UVpVLQycIH7FCYn4pTgpuAQg B1JW0z7Yk/8iGyjmdLft83KPz4O1HB//qZ+95JkeW/JVuxnBydDcTgf/M5fR5cmkNUfh 5NdfFv+pp3ehu7cl9OpKzqq8jRaUT4s/ZhDu4NYZznMYj53KhdSrjkHBEHw//su+Vn44 HcXYLEtBDBl4ZX+QvI7PCF+i6JVh6dPYkBXHg1HCV5ykioBXFBeQx4xbYw8aDPvRzqS2 eMJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=biaxzDl7TmWpyq4+2wDjqnNBQOTO3tAwfQ/weQBxHpM=; b=lVVtYEUjZZhfVs7vqLTYnslulbr0M6C7P7nnd+/9lW2sgmM2Zh+vpzRGZSNUjy3gnC Bl1Tvy5AUCadiMyTn0CNCpjCsFFRgviWIqrt7QonTSk6tD16/+a06D7VZTyfzq9DjKFs qMkMx78dEseBIC3FvpKR0zePHp/HTu7EX7jjIzmwZEJyjsAZuHl8z8jRg7qS7CaF9Og9 6YMixREpxdnrh7OiFssimbwW2LJ7RS3aJUKzfY/Y9ioEWw3SFnYxTSwstjdsHHk6ayqC fkDmxrs0N2xqVeDB9518DW2vq6w/VUlB3d6fdRUcKR3etFFNjanoo7xIXd6LeMADJr+n VHbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id r188si3916677qkc.264.2018.11.12.12.50.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 12 Nov 2018 12:50:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:50588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJA3-0003OI-GL for patch@linaro.org; Mon, 12 Nov 2018 15:50:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJ9c-0003MY-BU for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:49:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMJ9b-00088f-B2 for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:49:52 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:34581) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMJ9a-000882-Vp for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:49:51 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MeknF-1fnnD83Wfl-00an7b; Mon, 12 Nov 2018 21:49:36 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 12 Nov 2018 21:49:26 +0100 Message-Id: <20181112204929.12625-2-laurent@vivier.eu> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181112204929.12625-1-laurent@vivier.eu> References: <20181112204929.12625-1-laurent@vivier.eu> X-Provags-ID: V03:K1:W7OfH3Cd/slzVN7fFnjD0i0Uc4NBPqa70zKKNeX2V+KGaPYZOsv 5IlL2DcvKcsY0v3lTwy+M+ClmpO2OYKlyHYzO+Lha/JOQp5GxKaYS3VDncsCHY1Zd82dGes tph93I01pKY/rFv6GxU6J8/7xwGPAzvP+y6M8YM3U6Fmp4RcUubKyeQ/QUh8xgKlqngQ1JZ hkX+NdjUAgTdaPVpzwBBw== X-UI-Out-Filterresults: notjunk:1; V01:K0:PbbQe1lucS8=:0HYUyMuJGtSDjGpIR7ti/C 8+vYFBhWb1RnPifPRtlbdrSpegezJj8I6esBgGKh+QmX+53HYeTcNGjWwc6kPjSLnq2UPoadS PiIbT6KF47ckWza0ByMusAFPXFMGkPr36BSMQSF6eA9NtZ+lvQFG8oPX77MzHlj1RZTEQb9Wi /yDhwOdhhZ+DvsgNQeOMsL/Rk+FmOlOujccnvZqKP2BuVe6dDCcwLDfnZ66cBwBnqHaSimdkf FP0nWp7mRsT1ifVnV7nojzYm1eIdcLTKa7qZ8856K4+2I76WRAurxi0X0zlVKdSBXvJObf9/s ld1qiIQfu0jELkQM+y1Fa1nOBDuc2EbgI9RIqWyDoL87hkynRLr+DKYTWwXr8DI6A9tIhygjG /WG/KosWrbq43VqhFymOLMS0Zey9uMr1UEAPIqXTWoENsQMcOt8TnIggYBgpbINezOKbZ+A5a lMsjKml8TjsIEi9EHoyIuFN/wrJr4NB8MgdRi6eb/T9LgxID6YaHxV1QkQVLiGZ52BliRAT+F VEBPPO67ShKrdKOWkgx86AUItiCOJzhcvwgDuHuYj5UhZyEel0oruymxbn++nwrxLogDOsh9P 8COVOxpaR3n0QwpSok0pNBkcef1B8kGo/pcWvNAjtwOztLuhlb/abar31j9356B2IWZezTUMO NiJcNVJbpXimoFH39rKQANgq/3bSucuLzZrnSzBN1wVk569bt3g6yUuDEpIZz21WrCtBReFTR Fl9VtcyAqTI+StjNWeG+sFb4j8xDzraPv+8nGHygv5dlvCcncuYAiS9P8t55EdIYvx5nT1AkD PPhaMpt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL 1/4] linux-user: Remove dead error-checking code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Remove some dead code spotted by Coverity (CID 1009855, 1390854, 1390847). The underlying cause in all these cases is the same: QEMU's put_user operations can't result in errors, but the kernel's equivalent does. So when code was copied from the kernel signal-frame-setup/teardown code, checks on error flags that were needed in the kernel became dead code for us. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Message-Id: <20181019161715.12122-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/m68k/signal.c | 3 --- linux-user/sh4/signal.c | 4 ---- linux-user/sparc/signal.c | 2 -- 3 files changed, 9 deletions(-) -- 2.17.2 diff --git a/linux-user/m68k/signal.c b/linux-user/m68k/signal.c index 38bd77ec16..49ff87c77b 100644 --- a/linux-user/m68k/signal.c +++ b/linux-user/m68k/signal.c @@ -334,9 +334,6 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, (uint32_t *)(frame->retcode + 0)); __put_user(0x4e40, (uint16_t *)(frame->retcode + 4)); - if (err) - goto give_sigsegv; - /* Set up to return from userspace */ env->aregs[7] = frame_addr; diff --git a/linux-user/sh4/signal.c b/linux-user/sh4/signal.c index c6752baa7e..cc89a48ff8 100644 --- a/linux-user/sh4/signal.c +++ b/linux-user/sh4/signal.c @@ -279,7 +279,6 @@ long do_sigreturn(CPUSH4State *regs) sigset_t blocked; target_sigset_t target_set; int i; - int err = 0; frame_addr = regs->gregs[15]; trace_user_do_sigreturn(regs, frame_addr); @@ -292,9 +291,6 @@ long do_sigreturn(CPUSH4State *regs) __get_user(target_set.sig[i], &frame->extramask[i - 1]); } - if (err) - goto badframe; - target_to_host_sigset_internal(&blocked, &target_set); set_sigmask(&blocked); diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index e44e99993c..295e415b1e 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -256,8 +256,6 @@ void setup_frame(int sig, struct target_sigaction *ka, /* t 0x10 */ val32 = 0x91d02010; __put_user(val32, &sf->insns[1]); - if (err) - goto sigsegv; } unlock_user(sf, sf_addr, sizeof(struct target_signal_frame)); return; From patchwork Mon Nov 12 20:49:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 150876 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3597632ljp; Mon, 12 Nov 2018 12:52:48 -0800 (PST) X-Google-Smtp-Source: AJdET5dINVcdqBRWZXv+JkymMSlBK+unN4tyQ4Fnk7t+uggPW39Zm2EEAIgrPZ9csbuFk6XolpmG X-Received: by 2002:a37:4f8a:: with SMTP id d132mr2332586qkb.17.1542055967933; Mon, 12 Nov 2018 12:52:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542055967; cv=none; d=google.com; s=arc-20160816; b=YKRlyARMapwf5RdiN2OdMqCa9kGETZMfcE3TF2AkRU+trdr/kwrpgUXFMRZzmsuN+H 2gmPnXZejsHMCgQhm1lq0TqM3dE7NFdvcdSAuK0IB3/Zg7QPGpu3xzujYZzx9X+urA2k 6NPEm14yLhfvV8tUrBabTwssGCOh1lL9pzhKYjvhRp9sIFwA20xNnALHnYz/AG2YpfnH kK3xQ/pKFIddfN77ZtWbZ/1f9TVwitFnhSJP04LaQwKwziG3h/6Qkk0PmaUv93wcX5yr OyF/ZqTd2yK0yScRajFvQdKXEl7bWicF28/+997Y72wxzou3ww7MDDmaI7mBRrYqjv/G sHzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=8YpK4/MDWUfHXQVeAwu0UnMIK2el0UyLVG/ofck/Abg=; b=HhCbX9h8Fq3P6nDFmuuiYsR8ioWVYKD4qGNllQxu+qXn2xERk9G8idhx3E32H+ngTm OS2Q1hNo5PwGyE7Ft5I3IwacWcitd47Uh6mag9OQdj3RdeyOhzitwfXOUcqwPFjTG80L gVPSkH2mb009GbitmZGmgxRoykVr8d/Gncu7198cIWcs51O9o4KMNTz3VMkc9ZE50RuN mO7IXlmw7LddTtU11J5Jki3iOznPj2dtRs2dxRpeNMkx8MsM3ZsdhewJX1w8BGTeN24S UrhKqPIXIBb+pVLrd29dNcoqWSW4Ca584OwsRRt/0jYVkq/JRvYWuYDdhxUXY/pkOIN4 2wqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l54si5133558qtf.302.2018.11.12.12.52.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 12 Nov 2018 12:52:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:50604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJCR-0005F6-1X for patch@linaro.org; Mon, 12 Nov 2018 15:52:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJA3-0003j3-4c for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMJA0-0000Hs-CY for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:19 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:46453) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMJA0-0000Gv-1L for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:16 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MlNYj-1fcleX1Noz-00lofL; Mon, 12 Nov 2018 21:49:36 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 12 Nov 2018 21:49:27 +0100 Message-Id: <20181112204929.12625-3-laurent@vivier.eu> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181112204929.12625-1-laurent@vivier.eu> References: <20181112204929.12625-1-laurent@vivier.eu> X-Provags-ID: V03:K1:vOFFLZth2b/P11W17dZZJO2WzqguzPqKfp2NLFHAj3TLsL4TPLT GjY41vKGOrTKR7b0/Wg7ulBYL1GnVGr+HiJNjXbkTTmtH8Sha3vNAul/7/MHshfmdYjVFo5 Qj2CllcA1zyoGk7RES57ZYkssj1RG+OU2wdV9aLNLN5kFb/w2jLIqTpo1ArzcT1eZzHswwX uAH/N1TSWJzRi4tANeaug== X-UI-Out-Filterresults: notjunk:1; V01:K0:0P3X6aCz0tY=:nRVWeeW5KuVrp4Jfdty3lE QbQMbVtFq1d56bwHTovylCVYsVJPoofzNV1gwKTEgeECTegGSPdoNrMz6GfLRPXVbavXmfdKG 4lZGF3wkwrO1cNJtBmHA34cR0JS8Y+ULrNYL1FG11lgSL/y/APQUWEXJy3+sip07ZzSMJWzM3 dMEzmISPYmTiMFlLI1osYfR7VI9r/57WNEsrxJ09yMQ9V0MC5yrlJCSwqqXWAZvHaTmWV7LRK 2e4j6Bao7BMfJS8GHjqgo7YeVJEMPu2noYfvSJ0hFI5Me245DRCyjCahugkzvCAOX4cbi6zAQ 8LwjoqEJP+JOigDI6fprhXZ+9F44OnN49wUt+WcCUYwsz6Lk8I0xnmFZE65YgMBF7xv6BS2JB 0n05BWTpagrTKYTcm5HrhLqPql64sCniJVtstWoN3hK7lL8sixOsRpYI890cZVt5hdJ/KxG+M sc3cspPAeqIyQinOrAdReFNe12SlZO3aBRWPEmpvS3y8KZlgDKNvc9jx1eklSlGrAn3HscDSl DonhnG4VeFt8HIiErYYRUvTKBUzskpsELqejA3TpNkCBNgATuP9uZrsRTNdB2xEVlP2uXGGxy BQOJceZ2GDTqPFWNFjDKHfuQPEka8SERT/wKCY1bfHPlDH9NIfF485v+OqZ6VA0ClgGWnHnqo CWQVmsnlrfWoQ3I2zqKn93ErBtY+GBoO4JveSNx9hVTrUsGCuQ5U9UgDbmP34EuBbi9+TrJTf zQY3qowQDYbxIl/Bti/YGSOs+zCCcAuVakPAp7MA6XzdWCtzwvpf79XSNvpx0//Vgu5TJPsgg IyVKpGS X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.135 Subject: [Qemu-devel] [PULL 2/4] linux-user: Don't call gdb_handlesig() before queue_signal() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The CPU main-loop routines for linux-user generally call gdb_handlesig() when they're about to queue a SIGTRAP signal. This is wrong, because queue_signal() will cause us to pend a signal, and process_pending_signals() will then call gdb_handlesig() itself. So the effect is that we notify gdb of the SIGTRAP, and then if gdb says "OK, continue with signal X" we will incorrectly notify gdb of the signal X as well. We don't do this double-notify for anything else, only SIGTRAP. Remove this unnecessary and incorrect code from all the targets except for nios2 (whose main loop is doing something different and broken, and will be handled in a separate patch). This bug only manifests if the user responds to the reported SIGTRAP using "signal SIGFOO" rather than "continue"; since the latter is the overwhelmingly common thing to do after a breakpoint most people won't have hit this. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20181019174958.26616-2-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/aarch64/cpu_loop.c | 13 +++++-------- linux-user/alpha/cpu_loop.c | 12 ++++-------- linux-user/arm/cpu_loop.c | 16 ++++------------ linux-user/cris/cpu_loop.c | 16 ++++------------ linux-user/hppa/cpu_loop.c | 11 ++++------- linux-user/i386/cpu_loop.c | 16 ++++------------ linux-user/m68k/cpu_loop.c | 16 ++++------------ linux-user/microblaze/cpu_loop.c | 16 ++++------------ linux-user/mips/cpu_loop.c | 16 ++++------------ linux-user/openrisc/cpu_loop.c | 11 ++++------- linux-user/ppc/cpu_loop.c | 15 +++++---------- linux-user/riscv/cpu_loop.c | 2 +- linux-user/s390x/cpu_loop.c | 9 +++------ linux-user/sh4/cpu_loop.c | 17 ++++------------- linux-user/sparc/cpu_loop.c | 16 ++++------------ linux-user/xtensa/cpu_loop.c | 11 ++++------- 16 files changed, 62 insertions(+), 151 deletions(-) -- 2.17.2 diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c index c97a646546..65d815f030 100644 --- a/linux-user/aarch64/cpu_loop.c +++ b/linux-user/aarch64/cpu_loop.c @@ -73,7 +73,7 @@ void cpu_loop(CPUARMState *env) { CPUState *cs = CPU(arm_env_get_cpu(env)); - int trapnr, sig; + int trapnr; abi_long ret; target_siginfo_t info; @@ -121,13 +121,10 @@ void cpu_loop(CPUARMState *env) break; case EXCP_DEBUG: case EXCP_BKPT: - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_SEMIHOST: env->xregs[0] = do_arm_semihosting(env); diff --git a/linux-user/alpha/cpu_loop.c b/linux-user/alpha/cpu_loop.c index c1a98c8cbf..824b6d6658 100644 --- a/linux-user/alpha/cpu_loop.c +++ b/linux-user/alpha/cpu_loop.c @@ -179,14 +179,10 @@ void cpu_loop(CPUAlphaState *env) } break; case EXCP_DEBUG: - info.si_signo = gdb_handlesig(cs, TARGET_SIGTRAP); - if (info.si_signo) { - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } else { - arch_interrupt = false; - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_INTERRUPT: /* Just indicate that signals should be handled asap. */ diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 26928fbbb2..ee68aa60bf 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -397,18 +397,10 @@ void cpu_loop(CPUARMState *env) break; case EXCP_DEBUG: excp_debug: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_KERNEL_TRAP: if (do_kernel_trap(env)) diff --git a/linux-user/cris/cpu_loop.c b/linux-user/cris/cpu_loop.c index 37bdcfa8cc..dacf604c7d 100644 --- a/linux-user/cris/cpu_loop.c +++ b/linux-user/cris/cpu_loop.c @@ -64,18 +64,10 @@ void cpu_loop(CPUCRISState *env) } break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index 0301c766c6..880955fdef 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -182,13 +182,10 @@ void cpu_loop(CPUHPPAState *env) queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_DEBUG: - trapnr = gdb_handlesig(cs, TARGET_SIGTRAP); - if (trapnr) { - info.si_signo = trapnr; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, trapnr, QEMU_SI_FAULT, &info); - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */ diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c index 2374abfd0b..51cfa006c9 100644 --- a/linux-user/i386/cpu_loop.c +++ b/linux-user/i386/cpu_loop.c @@ -225,18 +225,10 @@ void cpu_loop(CPUX86State *env) /* just indicate that signals should be handled asap */ break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c index 30c3332af4..bfb41bbcc5 100644 --- a/linux-user/m68k/cpu_loop.c +++ b/linux-user/m68k/cpu_loop.c @@ -112,18 +112,10 @@ void cpu_loop(CPUM68KState *env) } break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/microblaze/cpu_loop.c b/linux-user/microblaze/cpu_loop.c index 2af93eb39a..c2190e15fd 100644 --- a/linux-user/microblaze/cpu_loop.c +++ b/linux-user/microblaze/cpu_loop.c @@ -113,18 +113,10 @@ void cpu_loop(CPUMBState *env) } break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 97e495747f..d0f62ec9b6 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -592,18 +592,10 @@ done_syscall: /* just indicate that signals should be handled asap */ break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_SC: if (do_store_exclusive(env)) { diff --git a/linux-user/openrisc/cpu_loop.c b/linux-user/openrisc/cpu_loop.c index 6c6ea871e1..f496e4b48a 100644 --- a/linux-user/openrisc/cpu_loop.c +++ b/linux-user/openrisc/cpu_loop.c @@ -85,13 +85,10 @@ void cpu_loop(CPUOpenRISCState *env) /* We processed the pending cpu work above. */ break; case EXCP_DEBUG: - trapnr = gdb_handlesig(cs, TARGET_SIGTRAP); - if (trapnr) { - info.si_signo = trapnr; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index 133a87f349..801f5ace29 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -69,7 +69,7 @@ void cpu_loop(CPUPPCState *env) { CPUState *cs = CPU(ppc_env_get_cpu(env)); target_siginfo_t info; - int trapnr, sig; + int trapnr; target_ulong ret; for(;;) { @@ -449,15 +449,10 @@ void cpu_loop(CPUPPCState *env) env->gpr[3] = ret; break; case EXCP_DEBUG: - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } else { - arch_interrupt = false; - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */ diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c index f137d39d7e..4cf3e94632 100644 --- a/linux-user/riscv/cpu_loop.c +++ b/linux-user/riscv/cpu_loop.c @@ -88,7 +88,7 @@ void cpu_loop(CPURISCVState *env) break; case EXCP_DEBUG: gdbstep: - signum = gdb_handlesig(cs, TARGET_SIGTRAP); + signum = TARGET_SIGTRAP; sigcode = TARGET_TRAP_BRKPT; break; default: diff --git a/linux-user/s390x/cpu_loop.c b/linux-user/s390x/cpu_loop.c index 99f5f1594f..51b5412ea2 100644 --- a/linux-user/s390x/cpu_loop.c +++ b/linux-user/s390x/cpu_loop.c @@ -61,12 +61,9 @@ void cpu_loop(CPUS390XState *env) break; case EXCP_DEBUG: - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) { - n = TARGET_TRAP_BRKPT; - goto do_signal_pc; - } - break; + sig = TARGET_SIGTRAP; + n = TARGET_TRAP_BRKPT; + goto do_signal_pc; case EXCP_PGM: n = env->int_pgm_code; switch (n) { diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c index fdd348170b..47e54b9b61 100644 --- a/linux-user/sh4/cpu_loop.c +++ b/linux-user/sh4/cpu_loop.c @@ -57,19 +57,10 @@ void cpu_loop(CPUSH4State *env) /* just indicate that signals should be handled asap */ break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } else { - arch_interrupt = false; - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case 0xa0: case 0xc0: diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 91f714afc6..7d5b337b97 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -268,18 +268,10 @@ void cpu_loop (CPUSPARCState *env) } break; case EXCP_DEBUG: - { - int sig; - - sig = gdb_handlesig(cs, TARGET_SIGTRAP); - if (sig) - { - info.si_signo = sig; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); diff --git a/linux-user/xtensa/cpu_loop.c b/linux-user/xtensa/cpu_loop.c index d142988ebe..bee78edb8a 100644 --- a/linux-user/xtensa/cpu_loop.c +++ b/linux-user/xtensa/cpu_loop.c @@ -239,13 +239,10 @@ void cpu_loop(CPUXtensaState *env) } break; case EXCP_DEBUG: - trapnr = gdb_handlesig(cs, TARGET_SIGTRAP); - if (trapnr) { - info.si_signo = trapnr; - info.si_errno = 0; - info.si_code = TARGET_TRAP_BRKPT; - queue_signal(env, trapnr, QEMU_SI_FAULT, &info); - } + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXC_DEBUG: default: From patchwork Mon Nov 12 20:49:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 150877 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3598397ljp; Mon, 12 Nov 2018 12:53:41 -0800 (PST) X-Google-Smtp-Source: AJdET5eKH/EDWHKbZQ1j/5//HHvQhKq5QUzgGdXryqgJYjlK9FjnDoXg2PRT5x8wD7LOt2IVQSYW X-Received: by 2002:ac8:450c:: with SMTP id q12mr2381783qtn.309.1542056021871; Mon, 12 Nov 2018 12:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542056021; cv=none; d=google.com; s=arc-20160816; b=BRsQkniBRJ5zOEZ5YCDgz0YcBeZr2yp7d0Fmw9uguoOpc9SHsrRiTQNtaYY774kxCM XvXOUzC+4UlWt85de1xp9TnxQ7YVD8xiy6+gEKHHoIPGbZYkgh0lezkTzlb00QDYLmYx ymWH6DtH/vT0NrUUrd5vBZH5B46/5ScSgE+FMAMx6g4AD0hQNHMqWPVOY7wb4CJXFsYy xKOMZC0qHCIZ7tqDFPpdr38VoKEjb+emLLhbO/XY1MuL9XAwME0zdyXrKInKoMc2lEzU A6X+meq3DJM86h42ez2kNlqBicbOmAZpxFW8sIV6NTJWXSXeR4tFfOtcBierkwDP9RFF 9A5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=op3HqANgMmAeAkYRDmaOsRoncuwlwu3DpID6TbkCS7o=; b=hTqLzwP9ZXN6dJBe705QArXEFh4GhrXaysMUxYUBSRnhP+lT1TanwhO782Q5gdGV68 h5xBISK3bUIKVEOJ9YZDWvKoKzzMFdGA7s300WFVFUePvTfB2Hc2pXzIz702lfTSMGhb 3yY9nAH1MhrWybFW0u9E+bgLu43iWJF0/ZTlNEDnEW3Dy+xh0sytdFL1LhJCw8Qy+SGm hXM5eOlVAg0l4vB2+oUI/R6S3zWNuzDMy1Qw5QRciq3oXFFhoXjkjkYBXHR/wDaOYYs0 E2tN5DPkg0Xsbaop3icDg1JgaAw3S3oysh2nbsxxDAnybvGPSfWgucFztl3cTx26zYRO XFBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y13si5764224qti.151.2018.11.12.12.53.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 12 Nov 2018 12:53:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:50608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJDJ-0006FN-9M for patch@linaro.org; Mon, 12 Nov 2018 15:53:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJA2-0003iQ-BK for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMJ9z-0000HC-Kc for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:18 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:54491) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMJ9z-0000Em-0H for qemu-devel@nongnu.org; Mon, 12 Nov 2018 15:50:15 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M7JnA-1gPd4n0Iii-007n5W; Mon, 12 Nov 2018 21:49:37 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 12 Nov 2018 21:49:28 +0100 Message-Id: <20181112204929.12625-4-laurent@vivier.eu> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181112204929.12625-1-laurent@vivier.eu> References: <20181112204929.12625-1-laurent@vivier.eu> X-Provags-ID: V03:K1:HfFNGfjOKqUxp3LgkgvMvyoPLly08E89MNwOX1SkSG7DJMyVjOm otYJdf5ZE7W4SDy51UfLxR4aNxFichsMK4CL4T7e4si7QRxFYNHhut3jItWjXZwI4bf/dMe sZjFk72GKi8ymA0/CkP6ZZgmTb3ZhgJb3xBLySOpiY3E9U0dQHPMZmu/CM7CicOCzqfh3dO QHu7bXlfg/a8X54N/dq6g== X-UI-Out-Filterresults: notjunk:1; V01:K0:NoUl7/7vTes=:diUVavNUzEVU9N9AbTiXuY X7wSeswQs7CYXpc3v/dcQWcQLwlh+ORW0oNsm1Z0U8SvEp7rUiIugarZmESfHTk/PzoDTO7Ef 0xbYuFgOzLyH9wUEkYcS0hFwDF8T5giQxNtSdcZadXWlByCaQS7IzqISp3b98n4dBE24jRgQK TSSZ51t1gXx/aMZMfNRVJw25HN3rYPSnDrXr2/eBpQNjvrbwTleiJY6nYe1BtMZDiGVMqmTaw thVtZGE2WyB6NXZF7FcVTFri1ae7ZBcmJm10Z4jlsvBe5bhkttbuvlqji/eh0x8mvtpuI2FjZ NZswcDgoVdrl/I3Wewmoe9qKlksULjapnDtJ9dfZWfyyaV/C/t3BulzyeTWU2ea4joDvX/95m Bo3gEm/rFwBdM8ZX0RjWjmWuD+9nsHN1cowR780aitMsra0vGYuHj8zktNWqmdbi3CdWHyvkC JdooJc9DG0hXgyKh8Hoyngo+6RU+TPWXYNldgkfBNzj6/rErdQxF0mJiZWNQN4jjG5FyB43mJ 8aAUHdkVJIkxIE+ttFTrH8KN/+JuOW8k3+5kYn1/yqklGog3iB+T66jv2Z5ic+xMqZZ/XJwq/ OTwSlReaVwgSf4O8GgHX6vISe3D65D0FQzWzeMIvIwtH/Pii4fqM0Z8/K/pCmUQ80GS4dfS/9 QsaZn4QcRtww7X5VD7tEJIKyHaQW9AJDwlxp5uVQnfPO56O8YrtZP6pi6mgS6qLTYsnNRXq/F dVgiAD09KtHJN7bds0piUcJTmI2q0+A4zJ/oQaLCVcrOIgD4A7MoxXl1TvFs+P1abB2C/fWR6 TroiwJE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PULL 3/4] linux-user: Clean up nios2 main loop signal handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The nios2 main loop code's code does some odd things with gdb_handlesig() that no other target CPU does: it has some signals that are delivered to gdb and only to gdb. Stop doing this, and instead behave like all the other targets: * a trap instruction becomes a SIGTRAP * an unhandled exception type returned from cpu_exec() causes us to abort(), not to try to hand gdb a SIGILL This fixes in passing Coverity issue CID 1390853, which was a complaint that the old code failed to check the return value from gdb_handlesig(). Signed-off-by: Peter Maydell Message-Id: <20181019174958.26616-3-peter.maydell@linaro.org> Reviewed-by: Richard Henderson [lv: removed gdbsig unused variable] Signed-off-by: Laurent Vivier --- linux-user/nios2/cpu_loop.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) -- 2.17.2 diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index dac7a06181..b96b1aa119 100644 --- a/linux-user/nios2/cpu_loop.c +++ b/linux-user/nios2/cpu_loop.c @@ -26,13 +26,12 @@ void cpu_loop(CPUNios2State *env) CPUState *cs = ENV_GET_CPU(env); Nios2CPU *cpu = NIOS2_CPU(cs); target_siginfo_t info; - int trapnr, gdbsig, ret; + int trapnr, ret; for (;;) { cpu_exec_start(cs); trapnr = cpu_exec(cs); cpu_exec_end(cs); - gdbsig = 0; switch (trapnr) { case EXCP_INTERRUPT: @@ -68,7 +67,10 @@ void cpu_loop(CPUNios2State *env) env->regs[R_EA] = env->regs[R_PC] + 4; env->regs[R_PC] = cpu->exception_addr; - gdbsig = TARGET_SIGTRAP; + info.si_signo = TARGET_SIGTRAP; + info.si_errno = 0; + info.si_code = TARGET_TRAP_BRKPT; + queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; } case 0xaa: @@ -106,14 +108,7 @@ kuser_fail: default: EXCP_DUMP(env, "\nqemu: unhandled CPU exception %#x - aborting\n", trapnr); - gdbsig = TARGET_SIGILL; - break; - } - if (gdbsig) { - gdb_handlesig(cs, gdbsig); - if (gdbsig != TARGET_SIGTRAP) { - exit(EXIT_FAILURE); - } + abort(); } process_pending_signals(env);