public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/16581] New: GDB crash on inherit_abstract_dies infinite recursion
@ 2014-02-14  3:24 brobecker at gnat dot com
  2014-02-14  3:25 ` [Bug symtab/16581] " brobecker at gnat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: brobecker at gnat dot com @ 2014-02-14  3:24 UTC (permalink / raw)
  To: gdb-prs

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.


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

end of thread, other threads:[~2014-02-24 20:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  3:24 [Bug symtab/16581] New: GDB crash on inherit_abstract_dies infinite recursion brobecker at gnat dot com
2014-02-14  3:25 ` [Bug symtab/16581] " brobecker at gnat dot com
2014-02-14  3:26 ` brobecker at gnat dot com
2014-02-14  3:28 ` brobecker at gnat dot com
2014-02-14  3:32 ` brobecker at gnat dot com
2014-02-14  3:33 ` brobecker at gnat dot com
2014-02-20 17:16 ` cvs-commit at gcc dot gnu.org
2014-02-24 20:13 ` jan.kratochvil at redhat dot com
2014-02-24 20:57 ` brobecker at gnat 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).