Re: GDB 10.1: Backtrace goes into infinite loop
Simon Marchi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2020-11-13 5:16 p.m., Paul Smith via Gdb wrote: > 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. > Hi Paul, When you see the problem happening, you could save a core file (just run the generate-core-file command). Then, try to reproduce the problem using the core file. If it reproduces, you could upload it to a bug report. Simon