Thread overview
[Issue 7031] New: Stack overflow with immutable recursive struct
Nov 29, 2011
Trass3r
Nov 29, 2011
Trass3r
Nov 29, 2011
Trass3r
Dec 19, 2011
klickverbot
November 29, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7031

           Summary: Stack overflow with immutable recursive struct
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: mrmocool@gmx.de


--- Comment #0 from Trass3r <mrmocool@gmx.de> 2011-11-29 13:02:03 PST ---
immutable(ReflectionInfo)* reflection;

struct ReflectionInfo
{
    const(ReflectionInfo)[] objects;
}

$ gdb --args dmd -g test.d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 29, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7031



--- Comment #1 from Trass3r <mrmocool@gmx.de> 2011-11-29 13:03:59 PST ---
Another interesting testcase:

class ApiProvider
{
    void _getCsrfInfo() {} // comment this out and it suddenly works
    immutable(ReflectionInfo)* reflection;
}

struct ReflectionInfo
{
    const(ReflectionInfo)[] objects;
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 29, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7031



--- Comment #2 from Trass3r <mrmocool@gmx.de> 2011-11-29 13:06:43 PST ---
Maybe related to http://d.puremagic.com/issues/show_bug.cgi?id=5533 Recursion is in dwarf_typidx:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000493788 in dwarf_typidx (t=Cannot access memory at address
0x7fffff7feed8
) at backend/dwarf.c:1465
1465    {   unsigned idx = 0;
(gdb) bt
#0  0x0000000000493788 in dwarf_typidx (t=Cannot access memory at address
0x7fffff7feed8
) at backend/dwarf.c:1465
#1  0x0000000000493817 in dwarf_typidx (t=0x8c4950) at backend/dwarf.c:1574
#2  0x0000000000493ae2 in dwarf_typidx (t=0x8c4978) at backend/dwarf.c:1628
#3  0x0000000000494950 in dwarf_typidx (t=0x91f2c8) at backend/dwarf.c:1944
#4  0x0000000000493817 in dwarf_typidx (t=0x8c4950) at backend/dwarf.c:1574
#5  0x0000000000493ae2 in dwarf_typidx (t=0x8c4978) at backend/dwarf.c:1628
#6  0x0000000000494950 in dwarf_typidx (t=0x91f2a0) at backend/dwarf.c:1944
#7  0x0000000000493817 in dwarf_typidx (t=0x8c4950) at backend/dwarf.c:1574

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 19, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7031


klickverbot <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |code@klickverbot.at
         Resolution|                            |DUPLICATE


--- Comment #3 from klickverbot <code@klickverbot.at> 2011-12-19 10:08:35 PST ---
*** This issue has been marked as a duplicate of issue 7127 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------