From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6iFbAGyRF2m4ZQIAWB0awg (envelope-from ) for ; Fri, 14 Nov 2025 15:30:36 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Ug1imaBt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DEDB51E0B8; Fri, 14 Nov 2025 15:30:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 014441E04C for ; Fri, 14 Nov 2025 15:30:34 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5BF553858C2F for ; Fri, 14 Nov 2025 20:30:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BF553858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1763152234; bh=DI2ygX5J9jpRDHMcR/GW7Sp6YxHowUVfsuHw0N+bsCc=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ug1imaBtSAbi3Q5BAopp2XZ5atuZMVv0O9uiYTcI+TwQI0kNPeNem+yNI7qkUobt1 LrVO9qcalmtHYDteDeu/NSMtj6ODesWaq8EEgeQsL7zy1NWvyjYlA1n8iBPxwS4CWq Dv73RPPGBKlWjB2ODiLpEGEBEfBfNLzSfgWFCLuU= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2CC303858D20 for ; Fri, 14 Nov 2025 20:29:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2CC303858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2CC303858D20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763152185; cv=none; b=HQuwESBZgGaH/KEEYem8UrDfQJ9b56Ps2ogHeBkeF7QzLKik91dAXe4bJ5dD9uQm0rqBDgRppYFvvWKn85+i/eeCiDwoNRWyifWuKorAIJ+lP+bPV/GbKPBtniw0Iwk5n+yRzVfHJ5/YOV805JoNgnQtzfx0xBvIJJL4FXuzDxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763152185; c=relaxed/simple; bh=cdBcCZmLDRCKcpwgx1v+xFZLgFoCqxX9n+bZCI2cCKM=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=H90y7lrpWm6VJQP/qBS1+V1ZssFVmVmsEuMzcdmBiQwbgCYE3pYxUl1Mb4WXjdJHwzG2Y4907e4is+E1BOBXzUv6VFN6LEw++vQJHBuphxOn4JG6zJS21jvixOaKPWKRkempQOAsTN7gl3TMX0w1e69cH54GEM8craGJkh6W+xg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CC303858D20 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vK0QS-0004a6-4a for gdb@sourceware.org; Fri, 14 Nov 2025 15:29:44 -0500 Message-ID: <6c6b248a1b5385f0fec590e475934d207d7ef71e.camel@gnu.org> Subject: Re: GDB 15/16 crashing in add_thread_silent() To: gdb@sourceware.org Date: Fri, 14 Nov 2025 15:29:42 -0500 In-Reply-To: <87seegtlsg.fsf@tromey.com> References: <78bf54fc9dfbb57d3434d8435e94b091e1fa6785.camel@gnu.org> <9a1b77f25cab8eb7433476918a9c5be29091856c.camel@gnu.org> <24d8355f-0233-4fbd-ac6e-8cda3f61916e@simark.ca> <87seegtlsg.fsf@tromey.com> Organization: GNU's Not UNIX! Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.1 (by Flathub.org) MIME-Version: 1.0 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Paul Smith via Gdb Reply-To: psmith@gnu.org Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On Fri, 2025-11-14 at 13:13 -0700, Tom Tromey wrote: > > > > > > "Simon" =3D=3D Simon Marchi via Gdb > > > > > > writes: >=20 > > > Earlier if the PID couldn't be found then pid is set to > > > CORELOW_PID anyway, so this works and prevents the crash > > > (although, I think GDB should check for the nullptr return and do > > > _something_ non-crashy... maybe?) >=20 > See this thread as well >=20 > https://inbox.sourceware.org/gdb-patches/20251024124208.1875651-1- > tdevries@suse.de/ >=20 > I wonder if the fix (assuming it arrives) should be in GDB 17. Tom suggested exactly the same fix I did (although, in addition, thread.c:add_thread_silent(): inferior *inf =3D find_inferior_ptid (targ, ptid); should be handling nullptr return somehow, I should think). Anyway, Tom de Vries writes this in summary: > I suppose this is fixable, but I'm not sure it's worth the effort for > a core file that has such limited usability. I don't know about his core, but my coredump definitely doesn't have limited usability, because when I use GDB 8.2 from Rocky Linux the core is fully usable in all respects: I can see all the threads and interact with them in all ways. The downside for me is that I have a lot of Python macros that I need to work with my core files, and they don't work with the very old GDB 8.2, for various reasons. What we need to understand is why this much older GDB can work correctly with the core file, but newer GDB can't find basic things.