public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "palves at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/26754] Race condition when resuming threads and one does an exec
Date: Thu, 19 Nov 2020 23:52:58 +0000 [thread overview]
Message-ID: <bug-26754-4717-vdg27ronMD@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26754-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=26754
--- Comment #8 from Pedro Alves <palves at redhat dot com> ---
>> I would prefer to preserve gdb thread id == 1 before / after exec,
>> but that's a GDB concern, not a kernel interface concern.
> I don't understand what you mean here.
If we delete the zombie leader in reaction to PTRACE_EVENT_EXEC_BEGIN, then
when we get the PTRACE_EVENT_EXEC, we'll create a new thread for the new
leader, and that will end up with a GDB tid != 1.
1.1 main ()
* 1.2 thread()
and after exec we have:
* 1.3 main ()
I'm thinking that it would be better to end up with:
* 1.1 main ()
Similar to how if a non-threaded program execs, the main thread's thread number
doesn't change.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2020-11-19 23:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 1:19 [Bug gdb/26754] New: " simark at simark dot ca
2020-10-19 1:20 ` [Bug gdb/26754] " simark at simark dot ca
2020-10-19 1:21 ` simark at simark dot ca
2020-11-19 20:05 ` palves at redhat dot com
2020-11-19 20:19 ` simark at simark dot ca
2020-11-19 21:32 ` simark at simark dot ca
2020-11-19 22:57 ` palves at redhat dot com
2020-11-19 23:11 ` simark at simark dot ca
2020-11-19 23:52 ` palves at redhat dot com [this message]
2020-11-19 23:55 ` simark at simark dot ca
2022-09-29 16:58 ` simark at simark dot ca
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=bug-26754-4717-vdg27ronMD@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).