Re: Repro case! Re: GDB 10.1: Backtrace goes into infinite loop

Paul Smith via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Organization GNU's Not UNIX!
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.