This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/16957] New: gdb segfaults when loading symbols in C++11-enabled application
- From: "0xd34df00d at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 17 May 2014 17:49:33 +0000
- Subject: [Bug c++/16957] New: gdb segfaults when loading symbols in C++11-enabled application
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16957
Bug ID: 16957
Summary: gdb segfaults when loading symbols in C++11-enabled
application
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: 0xd34df00d at gmail dot com
Created attachment 7607
--> https://sourceware.org/bugzilla/attachment.cgi?id=7607&action=edit
Somewhat minimal reproducing example.
gdb-7.7.{0,1} segfaults for me when trying to debug my application. Debugging
gdb with gdb shows this trace inside gdb (only top 19 lines are shown, next
thousands of them are the same, I'd guess an infinite recursion):
(gdb) run ./main
Starting program: /usr/bin/gdb ./main
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
GNU gdb (Gentoo 7.7.1 p1) 7.7.1
Copyright (C) 2014 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-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./main...
Program received signal SIGSEGV, Segmentation fault.
d_print_comp (dpi=dpi@entry=0x7fffffffac00, options=options@entry=259,
dc=0x7fffffffb790) at ./cp-demangle.c:4721
4721 ./cp-demangle.c: ÐÐÑ ÑÐÐÐÐÐ ÑÐÐÐÐ ÐÐÐ ÐÐÑÐÐÐÐÐ.
(gdb) bt
#0 d_print_comp (dpi=dpi@entry=0x7fffffffac00, options=options@entry=259,
dc=0x7fffffffb790) at ./cp-demangle.c:4721
#1 0x00000000007172c5 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=<optimized out>) at ./cp-demangle.c:4517
#2 0x0000000000717fae in d_print_comp (dpi=0x7fffffffac00, options=259,
dc=0x7fffffffb610) at ./cp-demangle.c:4730
#3 0x00000000007182c6 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb628) at ./cp-demangle.c:4911
#4 0x000000000071b4cf in d_print_function_type (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, mods=0x0, dc=0x7fffffffb640) at ./cp-demangle.c:5605
#5 0x0000000000717432 in d_print_comp (dpi=0x7fffffffac00, options=259,
dc=0x7fffffffb640) at ./cp-demangle.c:4796
#6 0x00000000007182c6 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb658) at ./cp-demangle.c:4911
#7 0x0000000000717241 in d_print_comp (dpi=0x7fffffffac00, options=259,
dc=0x7fffffffb670) at ./cp-demangle.c:4481
#8 0x00000000007182c6 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb688) at ./cp-demangle.c:4911
#9 0x00000000007190f2 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb580) at ./cp-demangle.c:4923
#10 0x0000000000717241 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb6a0) at ./cp-demangle.c:4481
#11 0x0000000000719d14 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb700) at ./cp-demangle.c:4781
#12 0x000000000071a2a5 in d_print_comp (dpi=0x7fffffffac00, options=259,
dc=0x7fffffffb718) at ./cp-demangle.c:4422
#13 0x0000000000717099 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb778) at ./cp-demangle.c:4312
#14 0x0000000000717fae in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb790) at ./cp-demangle.c:4730
#15 0x00000000007172c5 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=<optimized out>) at ./cp-demangle.c:4517
#16 0x0000000000717fae in d_print_comp (dpi=0x7fffffffac00, options=259,
dc=0x7fffffffb610) at ./cp-demangle.c:4730
#17 0x00000000007182c6 in d_print_comp (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, dc=0x7fffffffb628) at ./cp-demangle.c:4911
#18 0x000000000071b4cf in d_print_function_type (dpi=dpi@entry=0x7fffffffac00,
options=options@entry=259, mods=0x0, dc=0x7fffffffb640) at ./cp-demangle.c:5605
Unfortunately, I am not able to provide a small enough minimal reproducing
example, only the included archive reproduces the crash for me. In order to
build it one needs Qt4, building is like (assuming gcc 4.8 or newer):
g++ -std=c++11 -I /usr/include/qt4/ -I /usr/include/qt4/QtCore/ -I
/usr/include/qt4/QtSql/ -L/usr/lib/qt4 -lQtCore -lQtSql -O0 -g -ggdb main.cpp
-o main
or
clang++ -std=c++11 -I /usr/include/qt4/ -I /usr/include/qt4/QtCore/ -I
/usr/include/qt4/QtSql/ -DQ_COMPILER_INITIALIZER_LISTS -L/usr/lib/qt4 -lQtCore
-lQtSql -O0 -g -ggdb main.cpp -o main
--
You are receiving this mail because:
You are on the CC list for the bug.