public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Paul Smith <psmith@gnu.org>
To: gdb@sourceware.org
Subject: Re: Repro case!  Re: GDB 10.1: Backtrace goes into infinite loop
Date: Mon, 01 Feb 2021 23:27:17 -0500	[thread overview]
Message-ID: <4ddd03fca69c1b14bf3bb2f591f410e1eddb0ca7.camel@gnu.org> (raw)
In-Reply-To: <f9ac93d9fe0062a870c2ebe53d21b435c04cf4d1.camel@gnu.org>

On Mon, 2021-02-01 at 22:21 -0500, Paul Smith via Gdb wrote:
> I've discovered that there's something wonky with the embedded Python
> interpreter and checking threads while pretty-printing stack
> variables.

More proof:

I rebuilt GDB 10.1 with this patch applied:

--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -394,7 +394,7 @@ infpy_threads (PyObject *self, PyObject *args)

   try
     {
-      update_thread_list ();
+      // update_thread_list ();
     }
   catch (const gdb_exception &except)
     {

Just to see, and this version of GDB works fine.

There's something unpleasant about invoking update_thread_list() while
we are attempting to pretty-print stack variables; it must mess with
some global state somewhere that doesn't expect to be messed with, at
that time.


  reply	other threads:[~2021-02-02  4:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 22:16 Paul Smith
2020-11-16  1:04 ` Simon Marchi
2020-11-21 18:48   ` Paul Smith
2020-11-21 20:33     ` Aurelian Melinte
2021-02-02  3:21 ` Repro case! " Paul Smith
2021-02-02  4:27   ` Paul Smith [this message]
2021-02-02 13:45     ` Paul Smith

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=4ddd03fca69c1b14bf3bb2f591f410e1eddb0ca7.camel@gnu.org \
    --to=psmith@gnu.org \
    --cc=gdb@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).