From patchwork Tue Oct 3 19:20:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 728820 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1305:b0:23f:8cfb:5ad7 with SMTP id s5csp43197lto; Tue, 3 Oct 2023 12:22:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEk9LN+zlELsocNp65hA1xtA73mbGeS+R03I2s7+Du1SK89TNPVro98uyvmaWGiTwHG38aq X-Received: by 2002:a05:622a:308:b0:418:1e68:6eaf with SMTP id q8-20020a05622a030800b004181e686eafmr376311qtw.47.1696360942809; Tue, 03 Oct 2023 12:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696360942; cv=none; d=google.com; s=arc-20160816; b=slM4LkMw4QlyfyqhLI8m7o5DJUaoH0ap3cKJbX3IcBUFnIo3XF7GDRUYtvU4VSR3dl NUOhbSVDuLHZ/G7mw8plT0ujwN+Hd35ksC/i1UZ3PSRcWlANfg/tiZhSqOxCp1d9tuBi GW0SheQx1vaR9Hu8+ykla9ACEF1WdGUe+UsF7QAII7yItmepQZykfTnp5+CB5+2qT7x+ aKPPjOegpyz8Fxlk4JhH/C2hSO6xHK0TeScZ9yhmhWE8aHWRv49HOUmWwaY4AwAiYU4L iISIkYGsjejM2oYdvBL4HS3DwYVBofTp6J/KELTQXRuWaXRzu8Onz8hgOPIXD/YmdxxE 9zBg== 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=H1WLp4iET98k15VXyaSQDw2efQeM3lo5zs7sjnpm5FA=; fh=snLBdPgTZLfuTuSyp61TvDpWpPfo2RkZAUqks3lr5MQ=; b=ToZ7TnSJW/+7z4k7HILOGOWHLDCDVRn+Vwe5kV9+Oxg9yMpSSGHT2i09SqN+UZahh+ td+hlakaKgq1K1Mow9MKO9IiMLbK4/y93M4/ebPU4Cd4IyY8knMTk0xxUZb+orK0AU8U GkvE1GbAsAIMpdNNcV2qYNCkpaHTUuPSxtAmQ7G6x65GXOX60pPIrFhtTmPUQ6OiN1Da ADvTNjQy8b8cqmRmuAUMVdkPSxjaapRLQLD5QkZsALLMmiD6VR2jeWRW3RWDlBngXoWr nbuZ5oPh4It8JtD7yZgw0cGYQGrKT8w+vMxVm9WFlNsYBqQfh2UOnAJ6HL1vpV663j9H yoag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSvjW6Tv; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g10-20020ac8580a000000b0041811ab1c0bsi786836qtg.531.2023.10.03.12.22.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 12:22:22 -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=bSvjW6Tv; 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 ) id 1qnkxC-0004xs-De; Tue, 03 Oct 2023 15:21:11 -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 ) id 1qnkwk-0004r6-Gx for qemu-devel@nongnu.org; Tue, 03 Oct 2023 15:20:42 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnkwT-0004dU-RS for qemu-devel@nongnu.org; Tue, 03 Oct 2023 15:20:42 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c62d61dc96so9651395ad.0 for ; Tue, 03 Oct 2023 12:20:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696360815; x=1696965615; darn=nongnu.org; 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=H1WLp4iET98k15VXyaSQDw2efQeM3lo5zs7sjnpm5FA=; b=bSvjW6Tvwxksg7jvbD2IvrfMHyKJ/dpjCHxFIbF+MfxncUSjpxlDMlhMNNFVfxKPVE iTrhGQoZj13DCyiss0v7FzkQ2eLDkZMkIHXAni0imbU47bYheit9LbFzlhM5OdkiY1oN 2Cs0wde6D9rfVv7WZr13+8/SUUx8FYlcDb2gZehTsLO+3A3sa7AatyqVP/UXJi8EWIzS guIfJ4W3WanTRnHsaJnxlj6kZ5bcZcXuSLe4tsw46Zlji9XQSvamNY6l0Og+bxaSUxni xaZtfKUT2iKKGiO1R3hGWcS+SZwxcPC5Yq/OnlMa6VHPTU7IZsn7F3PdldFyryY+soWM 11Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696360815; x=1696965615; 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=H1WLp4iET98k15VXyaSQDw2efQeM3lo5zs7sjnpm5FA=; b=BUKpo4ske9G/h/c6i60UAiP9TblHTwiX4YEfofY8XUlgIzq3OC6LDoxzDrhoONKMeN z+TWoqV9OT5EV57higVogQVHgsL8ye2+uZRznzirixthk3TYTI9G4NbbmswBMlk3FRqO 7zbtclzqIaDZZOMxS6ufZM9abR5L12Q8tNJJ91NfLGL2VhraGV2hSwj8h8gawq2TJQGc m70AJKJYQv2BaAvjsceMj7hbY9on4UyzrV0y2z05WrDOuhhy/m84DUR4yo7gBdhEU03A asl3UMYHCAjfQ1sxk8E/Fp02wQb0ux2MqXpYse9AU78MfLMH5EqhBLYmIwdtuO70Jtz2 7S+g== X-Gm-Message-State: AOJu0Ywn7sDsFKOLOoV/GtWi6/X4G0GAvfcv/ths1qeeITkXwdUkM0dd dXiwTizmUvXjQHKtpPlKDONfaADPl4rxV7ysGNw= X-Received: by 2002:a17:902:7207:b0:1bd:ca80:6fe6 with SMTP id ba7-20020a170902720700b001bdca806fe6mr470637plb.41.1696360815299; Tue, 03 Oct 2023 12:20:15 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id w5-20020a170902d3c500b001c5fd2a28d3sm1978497plb.28.2023.10.03.12.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:20:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, deller@gmx.de, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v5 2/9] linux-user: Exit not abort in die_with_backtrace Date: Tue, 3 Oct 2023 12:20:05 -0700 Message-Id: <20231003192012.1674888-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003192012.1674888-1-richard.henderson@linaro.org> References: <20231003192012.1674888-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 b7a2c47837..84a56b76cc 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -713,7 +713,7 @@ void die_with_signal(int host_sig) sigsuspend(&act.sa_mask); /* unreachable */ - abort(); + _exit(EXIT_FAILURE); } static G_NORETURN