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++/14065] New: Crash when loading symbols from C++11 / gcc 4.7binary


http://sourceware.org/bugzilla/show_bug.cgi?id=14065

             Bug #: 14065
           Summary: Crash when loading symbols from C++11 / gcc 4.7 binary
           Product: gdb
           Version: 7.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@sourceware.org
        ReportedBy: temporal@gmail.com
    Classification: Unclassified


Created attachment 6394
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6394
Binary which causes gdb to crash on load (linux/x86_64)

I have a binary which makes fairly heavy use of C++11 features including
variadic templates, decltype, etc.  GDB segfaults on startup when "reading
symbols" from this binary.

I tried to narrow the problem down by progressively commenting out code until
the problem went away, but although commenting out enough code fixed the
problem, it didn't seem to correlate with any one piece of code.  My guess is
that GDB is running out of space in some fixed-size table.  My code perhaps
triggers the problem because I am using lots of deeply-nested templates leading
to very long symbol names.

So, I am just attaching the whole binary.  You don't have to run the binary,
just try to load it in gdb.  (The code can be found at
kentons-code.googlecode.com, but it's complicated to build, undocumented, and
generally incomprehensible.)

The problem occurs in Ubuntu's gdb 4.7 as well as built-from-source gdb 4.7.1.

Happy to provide more info if you can tell me what would be useful.  :)


$ uname -a
Linux megaman 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux

$ gcc-4.7 --version
gcc-4.7 (Ubuntu/Linaro 4.7.0-7ubuntu3) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gdb --version
GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>.

$ gdb crashgdb
GNU gdb (Ubuntu/Linaro 7.4-2012.02-0ubuntu2) 7.4-2012.02
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/kenton/code/crashgdb...Segmentation fault (core
dumped)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]