Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <pedro@palves.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix windows_nat_target::fake_create_process ptid
Date: Sat, 23 Mar 2024 08:39:36 +0200	[thread overview]
Message-ID: <86wmptzc2f.fsf@gnu.org> (raw)
In-Reply-To: <20240322193030.1235342-1-pedro@palves.net> (message from Pedro Alves on Fri, 22 Mar 2024 19:30:30 +0000)

> From: Pedro Alves <pedro@palves.net>
> Date: Fri, 22 Mar 2024 19:30:30 +0000
> 
> While working on Windows non-stop mode, I managed to introduce a bug
> that led to fake_create_process being called.  That then resulted in
> GDB crashes later on, because fake_create_process added a thread with
> an incorrect ptid for this target.  It is putting dwThreadId in the
> tid field of the ptid instead of on the lwp field.  This is fixed by
> this patch.
> 
> I do however wonder why nobody has seen it this long.

AFAIU, to actually see the bug, one would need to attach GDB to a
process whose main thread has exited, is that true?  If so, I'm not
surprised this bug was not reported: it's unusual for the main thread
to exit without shutting down the process, and the need to attach to
such a process (as opposed to having it run from GDB to begin with)
makes that even more rare.  And finally, not every bug is reported by
the first person who sees it the first time, right?

  reply	other threads:[~2024-03-23  6:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 19:30 Pedro Alves
2024-03-23  6:39 ` Eli Zaretskii [this message]
2024-03-25 19:36   ` Pedro Alves
2024-03-25 19:57     ` [PATCH] New testcase gdb.threads/leader-exit-attach.exp (PR threads/8153) Pedro Alves
2024-03-26 15:26       ` Tom Tromey
2024-03-26 19:27         ` Pedro Alves
2024-03-26 20:04           ` Tom Tromey
2024-04-12 17:45       ` Pedro Alves

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=86wmptzc2f.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /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