From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6es8NbcRYmr2WSkAWB0awg (envelope-from ) for ; Thu, 23 Jul 2026 09:05:59 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=fT3XNyVS; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D747E1E09E; Thu, 23 Jul 2026 09:05:59 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5E7671E099 for ; Thu, 23 Jul 2026 09:05:59 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E37284BA9002 for ; Thu, 23 Jul 2026 13:05:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E37284BA9002 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=fT3XNyVS Received: from cat.banana.relay.mailchannels.net (cat.banana.relay.mailchannels.net [23.83.217.31]) by sourceware.org (Postfix) with ESMTPS id 0EAF84BA23E6 for ; Thu, 23 Jul 2026 13:03:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0EAF84BA23E6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palves.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0EAF84BA23E6 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=23.83.217.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811821; cv=none; b=ZH+4ULX3UT7NvcYlkafgDRznklOA7XrwJAbkFw22Ji2Kg5c0+EvndFQTKaQRM0h/KWc890DGl0mBUPTM/6wZma7QBaGaMg9UAK/A3ZVi4xrc2gX3B64iTGFu9hAxxduqWGlM5OCNc6bjPZEI+AGn5sFXbDeNlhaQkpbpf560lRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784811821; c=relaxed/simple; bh=GEzRtlioBcUpSRm5htuygTZUdt1zTDEdON8c4H1OXLs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=UQXIw0pTBR6+2Yux1KhGOByLMRqaQX5vZG7Y3GlqvcF57IMpOKepNWvLPmEw0jfyQ75DvY3NC9/Aa7CFK4WBBimHIQLe8+bwx1oetOyX41stkF3dYWDqR5ApDusl4CBNI3EcLGdYBlsqXNNEqK3JbFtPRtE7OwoBpClRoPJ3gRo= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=palves.net header.i=@palves.net header.a=rsa-sha256 header.s=dreamhost header.b=fT3XNyVS DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0EAF84BA23E6 X-Sender-Id: dreamhost|x-authsender|pedro@palves.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 17FAC80212D for ; Thu, 23 Jul 2026 13:03:40 +0000 (UTC) Received: from pdx1-sub0-mail-a249.dreamhost.com (100-104-248-98.trex-nlb.outbound.svc.cluster.local [100.104.248.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AE6BA800F74 for ; Thu, 23 Jul 2026 13:03:39 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|pedro@palves.net X-MC-Relay: Bad X-MailChannels-SenderId: dreamhost|x-authsender|pedro@palves.net X-MailChannels-Auth-Id: dreamhost X-Daffy-Absorbed: 4aa947c82a40a4bf_1784811819936_3030086814 X-MC-Loop-Signature: 1784811819936:3236539650 X-MC-Ingress-Time: 1784811819936 Received: from pdx1-sub0-mail-a249.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.104.248.98 (trex/8.0.2); Thu, 23 Jul 2026 13:03:39 +0000 Received: from localhost (bl20-181-64.dsl.telepac.pt [2.81.181.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pedro@palves.net) by pdx1-sub0-mail-a249.dreamhost.com (Postfix) with ESMTPSA id 4h5WXC1QR2zyrH for ; Thu, 23 Jul 2026 06:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palves.net; s=dreamhost; t=1784811819; bh=dCPtsmVJJL1F/MMAhPGDtiIxveoej419Qp7h8w0TvgQ=; h=From:To:Subject:Date:Content-Transfer-Encoding; b=fT3XNyVS3xBuaqKhv0nMtr9XMt9zv24uPb9Jmvy7KIJr0UAiVniOr2Gyq7qaXQkIs 6sASk/EQDplUz5iOhGtjgw0Dns9Ib4cShIQl1/HUqkyhQQUxjmMzfwlo67EyLqBlWb rBAOhpFZRmUApPY4/QmyqiaQrUR7azO2zQc2TDUdfYrLFcQihJUAy0TFpACiEMfIKZ 1JoaKHhLgXOrKcy3ZvrYp4x/VTWs+le/0cCiwHtqmFK/zpVyRxrH7YHsTSZ6irWDHw DOUSpOSddbjOlSh5tOPrivWJYMhwYLcnfHRri7f4vciDpUWOiHi88oT3u3X+yhsfTn l31selX7KzqOA== From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 12/27] gdb.base/exitsignal.exp: Relax SIGSEGV second-chance pattern Date: Thu, 23 Jul 2026 14:01:03 +0100 Message-ID: <20260723130118.206735-13-pedro@palves.net> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260723130118.206735-1-pedro@palves.net> References: <20260723130118.206735-1-pedro@palves.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org The "trigger SIGSEGV, second-chance" test matches the signal stop with Thread .* received signal SIGSEGV.* GDB only prints the "Thread NNN received signal ..." form when the inferior has more than one thread. For a single-threaded inferior it prints "Program received signal ..." instead. Whether a Windows program is multi-threaded by the time it reaches main depends on the C runtime it links against: - A program built against the dynamic UCRT pulls in ucrtbase.dll, which starts additional threads during its initialization. - A program built with a statically-linked CRT does not go through that initialization, so it is still single-threaded at main. Native MinGW test programs pull in ucrtbase.dll and so are multi-threaded, but programs built with a clang x86_64-pc-windows-msvc toolchain default to the static CRT and are single-threaded, so GDB announces the signal with "Program received signal ..." and the test fails: Program received signal SIGSEGV, Segmentation fault. 0x00007ff628a9102f in main (argc=1, argv=0x50ff90) at .../gdb/testsuite/gdb.base/segv.c:41 41 *(volatile int *) 0; (gdb) FAIL: gdb.base/exitsignal.exp: how=run: signal: trigger SIGSEGV, second-chance Fix this by dropping the "Thread .*" prefix from the pattern so that it matches both the "Thread NNN received signal" and "Program received signal" forms. Change-Id: I3ac3cd316da2126635a9e2b3338befec9c2a5195 --- gdb/testsuite/gdb.base/exitsignal.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/exitsignal.exp b/gdb/testsuite/gdb.base/exitsignal.exp index 0ffb20258d1..dd968300fcb 100644 --- a/gdb/testsuite/gdb.base/exitsignal.exp +++ b/gdb/testsuite/gdb.base/exitsignal.exp @@ -125,7 +125,7 @@ proc test_signal {how exec binfile} { # We're debugging a pure Win32 program with no SEH handler. The # previous continue caught the first-chance exception. Now we # catch the second-chance one. - gdb_test "continue" "Thread .* received signal SIGSEGV.*" \ + gdb_test "continue" " received signal SIGSEGV.*" \ "trigger SIGSEGV, second-chance" } elseif {[istarget "*-*-cygwin*"]} { # Cygwin calls DebugBreak before it lets the process exit. -- 2.54.0