Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Smith via Gdb <gdb@sourceware.org>
To: gdb@sourceware.org
Subject: Re: GDB 15/16 crashing in add_thread_silent()
Date: Fri, 14 Nov 2025 15:29:42 -0500	[thread overview]
Message-ID: <6c6b248a1b5385f0fec590e475934d207d7ef71e.camel@gnu.org> (raw)
In-Reply-To: <87seegtlsg.fsf@tromey.com>

On Fri, 2025-11-14 at 13:13 -0700, Tom Tromey wrote:
> > > > > > "Simon" == Simon Marchi via Gdb <gdb@sourceware.org>
> > > > > > writes:
> 
> > > 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?)
> 
> See this thread as well
> 
> https://inbox.sourceware.org/gdb-patches/20251024124208.1875651-1-
> tdevries@suse.de/
> 
> 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 = 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.

  reply	other threads:[~2025-11-14 20:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 18:56 Paul Smith via Gdb
2025-11-14 19:12 ` Simon Marchi via Gdb
2025-11-14 19:20 ` Paul Smith via Gdb
2025-11-14 19:25   ` Simon Marchi via Gdb
2025-11-14 19:38     ` Paul Smith via Gdb
2025-11-14 20:03       ` Simon Marchi via Gdb
2025-11-14 20:13         ` Tom Tromey
2025-11-14 20:29           ` Paul Smith via Gdb [this message]
2025-11-14 20:42             ` Paul Smith via Gdb
2025-11-18 18:33               ` Tom Tromey
2025-11-18 19:30                 ` Paul Smith via Gdb
2025-11-18 20:24                   ` Simon Marchi via Gdb
2025-11-24 16:36                     ` Paul Smith via Gdb
2025-11-21 11:59       ` Tom de Vries via Gdb
2025-11-24 15:19         ` Paul Smith via Gdb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c6b248a1b5385f0fec590e475934d207d7ef71e.camel@gnu.org \
    --to=gdb@sourceware.org \
    --cc=psmith@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox