This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17139] New: 'info locals' crashes in presence of unordered_map


https://sourceware.org/bugzilla/show_bug.cgi?id=17139

            Bug ID: 17139
           Summary: 'info locals' crashes in presence of unordered_map
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: critical
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: MikeGebirge at gmail dot com

Created attachment 7693
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7693&action=edit
small program that gdb can't handle on my machine

Crash on 'info locals' in presence of unordered_map

Steps to reproduce: Download the attached file gdbcrash.cpp and follow
the instructions (compile, run, debug), including the final call 'info locals'.

Expected behaviour: Any meaningful output.

Observed behaviour: gdb hangs, consumes 100% CPU (a single core), and 
"slowly" (tens of seconds) allocates more and more memory, 
eventually allocating >10 GiB memory and exhausting my machine. The 
call 'info locals' never returns or prints any useful information.

Discovered while trying to debug an application using an unordered_map. 
As soon as I remove the unordered_map, gdb works as expected.
The thing with unordered_map is pure speculation, though.

I marked this 'critical' as it makes it impossible for me to do any 
meaningful debugging using gdb on an application I'm writing.

First encountered in gdb 7.6.2, but still present in gdb 7.7.1

Versions:
GNU gdb (Debian 7.7.1-2) 7.7.1
  'This GDB was configured as "x86_64-linux-gnu".'
GNU gdbserver (Debian 7.7.1-2) 7.7.1
gcc version 4.9.0 (Debian 4.9.0-7)
  Note that your compiler must support c++11 to support unordered_map
Linux 3.14-1-amd64
Debian Testing, with gdb & gdbserver (and only those two) from Sid

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]