public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16957] New: gdb segfaults when loading symbols in C++11-enabled application
@ 2014-05-17 17:49 0xd34df00d at gmail dot com
  2014-05-17 19:09 ` [Bug c++/16957] " 0xd34df00d at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: 0xd34df00d at gmail dot com @ 2014-05-17 17:49 UTC (permalink / raw)
  To: gdb-prs

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.
>From gdb-prs-return-15737-listarch-gdb-prs=sources.redhat.com@sourceware.org Sat May 17 18:56:56 2014
Return-Path: <gdb-prs-return-15737-listarch-gdb-prs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-prs@sources.redhat.com
Received: (qmail 3442 invoked by alias); 17 May 2014 18:56:55 -0000
Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-prs.sourceware.org>
List-Subscribe: <mailto:gdb-prs-subscribe@sourceware.org>
List-Archive: <http://sourceware.org/ml/gdb-prs/>
List-Post: <mailto:gdb-prs@sourceware.org>
List-Help: <mailto:gdb-prs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: gdb-prs-owner@sourceware.org
Delivered-To: mailing list gdb-prs@sourceware.org
Received: (qmail 3411 invoked by uid 48); 17 May 2014 18:56:55 -0000
From: "keiths at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/16957] gdb segfaults when loading symbols in C++11-enabled
 application
Date: Sat, 17 May 2014 18:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: c++
X-Bugzilla-Version: 7.7
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: keiths at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-16957-4717-tNtLuLPpCr@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-16957-4717@http.sourceware.org/bugzilla/>
References: <bug-16957-4717@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-q2/txt/msg00243.txt.bz2
Content-length: 603

https://sourceware.org/bugzilla/show_bug.cgi?id\x16957

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
Looks like another demangler crash. Uncertain if it exactly c++/16752, but it
could be the same bug(s). Can you try the patch referenced in that bug?

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-10-21  6:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-17 17:49 [Bug c++/16957] New: gdb segfaults when loading symbols in C++11-enabled application 0xd34df00d at gmail dot com
2014-05-17 19:09 ` [Bug c++/16957] " 0xd34df00d at gmail dot com
2014-05-17 19:21 ` keiths at redhat dot com
2014-05-17 19:24 ` 0xd34df00d at gmail dot com
2014-05-17 19:27 ` keiths at redhat dot com
2014-05-17 20:01 ` 0xd34df00d at gmail dot com
2014-05-19  9:41 ` gbenson at redhat dot com
2014-05-19  9:43 ` gbenson at redhat dot com
2014-05-19 12:53 ` 0xd34df00d at gmail dot com
2014-05-19 14:04 ` gbenson at redhat dot com
2014-05-27 12:10 ` palves at redhat dot com
2021-10-21  6:49 ` bap.fayol at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).