Message ID | 20230822203415.1184491-3-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp468170wrp; Tue, 22 Aug 2023 13:35:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7A1Hki7Cc5VCxJ+HK6H7Pq45XFwMtgd5h/u4FcfdM1nVhnFr8qvzKSUb59CTuGLjOjHEV X-Received: by 2002:a05:620a:22e3:b0:76d:b68c:f659 with SMTP id p3-20020a05620a22e300b0076db68cf659mr1668040qki.21.1692736510584; Tue, 22 Aug 2023 13:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692736510; cv=none; d=google.com; s=arc-20160816; b=JG2p5F5kXPMzsSWs21QERCBpA80Hgi6OF6XUWGbGWOMYlJqnLxluj4ag9G4wylp8bM R1i3R01RtekNY83iKctue27teAAif/CV8lS+DYdjtnA79h0+6F6aNNCy7e9uxgcEV9V8 PtrGwNonyHuBRr3aGfRH8cdIRzh0mNzms89wJtLmwXpLbtXBGFGV7mxZnzGdOOYZIVDG 8zeso169s2y1cqg4LOTApSbycWBIUgAYTNNLJsjkXRCDTKzXpsIPyE8AKUHG9phY587R 2AV+MsKUCJwY+AHk0/hOl0jCLJlLvax9uT+nFBTzh+drrg500dz1QrgCd3KYWYP3o+U+ yW1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rQp++5N0yIEsVmUaGN89LifNvR6oAeooLY4sPs12hmU=; fh=uta8CuNdWwEUIsmWLQQIuZWY0GOyjYTd4DbN32nR8cE=; b=hG5I/RGSlWMY/lwJ1od1UGqOwraYJVp0Apv2FHkvgJ8BdKUbgIBtslma3jkK9FZUf3 qItZV7tV39xp8N3AzdZJTGAZIGeYsa3of8BVL4VaQoMrtBp9dBHihAQJuBw2ob3pC4vr toIu1O0T/zS1C9mxJovoWAzEp42B36RUFXayIWNHVDx3iQWZ0o/bvHGMS3vfqHQH45tN 79h7lWIuns2r3FUWYN2ZMotbB1GsrP/ZWv2lUL2Zi5MU1tTOgKg4RmreLNdkAHbKSakb gZo0jRybvN1iibaujWrBCR7iy8lPLbKnLAabc1+A6nTd7p+MQV3oqeetKISN8PD8p7kq 8qug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yVWdYHiN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c27-20020a05620a269b00b0076c930c7fd9si6793097qkp.657.2023.08.22.13.35.10 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 13:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yVWdYHiN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1qYY52-0002dk-9Z; Tue, 22 Aug 2023 16:34:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qYY50-0002c8-HG for qemu-devel@nongnu.org; Tue, 22 Aug 2023 16:34:22 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qYY4x-0005EH-Pm for qemu-devel@nongnu.org; Tue, 22 Aug 2023 16:34:22 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-68a42d06d02so1933384b3a.0 for <qemu-devel@nongnu.org>; Tue, 22 Aug 2023 13:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692736458; x=1693341258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rQp++5N0yIEsVmUaGN89LifNvR6oAeooLY4sPs12hmU=; b=yVWdYHiN0iMeyApJ2LM+nQ5ob8Nt3TpoIIJkbrHw43x5aXzcKBB21Shw4GowNq5Jif 6i1gTv13B5vbH0ZUrgiF3L2TZYm6o93cku8O81OKdk26C8P/n3PEOx2EpMQCKSRxlhgb SEH6IRb8GfAx0bxkZn0GeKkac8u7vRk9kUx1ntXdNQ+mepfPTO2dz4oN3BdizwO3vbKO VEFGgKkbOAeWO7MCqhfdx32ucsltKN91vdBK29GgRlZAxQMeOVyaGqRprCAyMY/K1sYx fLDAfF92JszHFh2n6F72lXU/Lh6vYLM+NNu7Otanxuuc41n5sb8BuZxWvcqB+vTAUno4 KdUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692736458; x=1693341258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rQp++5N0yIEsVmUaGN89LifNvR6oAeooLY4sPs12hmU=; b=SINlxV/N8rid9kN3qS9GSIsDwNSxqlRGaj7Cs0+UHswH9TTJ8zS76Z/gfZAzvvvXrs 62ae+6+EOsx/anqC27+WSo1mOGG+QmxB7K06XcH+9acSbvu3/29xXgjbF0RAEg+qJylG JBrfFYZrQTlbBVBDAJ6PZUgPkWcWO6aMFTXh0BPWN1GDevJuTqeOS2fW99nRmgsgTuzf Lq83pg86aD8tJa7o6Wf1cN2MIzxPFvLmvjhzIj9DsVsSSyUCEnJZCxuFXpvIwCg27tsC JpfMUmUq7HGOMygk6OrXzcvftQucAyuo/ncVRcT19qI5C8DpuoaHvkwmh05xRgPA2ToE YxqQ== X-Gm-Message-State: AOJu0Yw5bhEaklGCUuEcsdDF1G0h63svHvSSC3R/aKLwsAFJdFsYGB9z AmLT8FFE4poM6fTOnPyXCWLNUOc+jYYovd2ElR8= X-Received: by 2002:a05:6a20:dc94:b0:140:4563:2243 with SMTP id ky20-20020a056a20dc9400b0014045632243mr7025205pzb.50.1692736458230; Tue, 22 Aug 2023 13:34:18 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:4e3c:f4a4:b92a:b5ab]) by smtp.gmail.com with ESMTPSA id i25-20020a633c59000000b00564aee22f33sm8311823pgn.14.2023.08.22.13.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 13:34:17 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 2/3] linux-user: Exit not abort in die_with_backtrace Date: Tue, 22 Aug 2023 13:34:14 -0700 Message-Id: <20230822203415.1184491-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230822203415.1184491-1-richard.henderson@linaro.org> References: <20230822203415.1184491-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
linux-user: Detect and report host crashes
|
expand
|
On 22/8/23 22:34, Richard Henderson wrote: > This line is supposed to be unreachable, but if we're going to > have it at all, SIGABRT via abort() is subject to the same signal > peril that created this function in the first place. :) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > We can _exit immediately without peril. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/signal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/signal.c b/linux-user/signal.c index e1cd111a1b..57fbf2f58b 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -718,7 +718,7 @@ void die_with_signal(int sig) sigsuspend(&act.sa_mask); /* unreachable */ - abort(); + _exit(EXIT_FAILURE); } static G_NORETURN
This line is supposed to be unreachable, but if we're going to have it at all, SIGABRT via abort() is subject to the same signal peril that created this function in the first place. We can _exit immediately without peril. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)