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]>
Hi all;

I just upgraded our users from a toolset using GCC 8.1.0, binutils
2.30, and GDB 8.2.1, to a new one using GCC 10.2, binutils 2.35.1, and
GDB 10.1 (on GNU/Linux x86_64).

Now some of my users are running into a problem where they run the "bt"
command and it shows some subset of the stack frames, then jumps back
and starts over printing from frame 0, and does this forever until you
use ^C to stop it.

Apparently this doesn't happen every time, and the number of frames
that are shown are variable (but usually a smaller number like 2 to 5
frames).  By "not every time" I mean after a breakpoint sometimes we
get a good bt and sometimes it recurses, but if it recurses for a given
bt it will always recurse (that is if you use ^C to stop then "bt"
again it recurses again).

If we do the same thing with the older GDB (keeping the newer
compiler/binutils) then we don't see this behavior.

FWIW, the code in question is C++ code and was compiled with -ggdb3 and
no optimization.

Just wondering if anyone has seen something like this, and/or how to
try to collect more details.
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.