This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/16581] New: GDB crash on inherit_abstract_dies infinite recursion
- From: "brobecker at gnat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 14 Feb 2014 03:24:46 +0000
- Subject: [Bug symtab/16581] New: GDB crash on inherit_abstract_dies infinite recursion
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16581
Bug ID: 16581
Summary: GDB crash on inherit_abstract_dies infinite recursion
Product: gdb
Version: 7.7
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: brobecker at gnat dot com
Compiling at high levels of optimization some code involving nested subprograms
making recursive calls of the parent function sometimes produces some debugging
information that causes GDB to crash.
See https://www.sourceware.org/ml/gdb-patches/2014-01/msg00798.html:
The c++ code causing the problem is:
// Integer variants of certain metrics, used for HTML rendering.
int ascent(FontBaseline baselineType = AlphabeticBaseline) const
{
if (baselineType == AlphabeticBaseline)
return lroundf(m_ascent);
return height() - height() / 2;
}
int height(FontBaseline baselineType = AlphabeticBaseline) const
{
return ascent(baselineType) + descent(baselineType);
}
As you can see,ascent(0x5816d55) calls height(0x5812c1b),and height calls
ascent(0x5816d55) recursivly.And the compiler generates these dwarf code
representing this relationship preciously.
>> A dwarf die may have the following relationship:
>> 564860c<-----------------------------
>> | |
>> |(abstract origin) |
>> | |
>> V |
>> 5816d55 | (abstract origin)
>> | |
>> |(child) |
>> | |
>> V |
>> ... |
>> 5812c34------------------------------
>> So inherit_abstract_dies may results in infinite recursive call.
--
You are receiving this mail because:
You are on the CC list for the bug.