Bug 7127 – Const-related infinite recursion in DWARF generation
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-12-18T07:09:00Z
Last change time
2011-12-19T10:08:35Z
Keywords
patch
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2011-12-18T07:09:08Z
This example crashes DMD from Git master when invoked with -g or -gc:
---
struct Foo {
const(Foo)* bar;
}
Foo foo;
---
(the global is just necessary to trigger debug info generation for Foo).
What happens is that that for emitting debug info for const types, a copy of the type is made at https://github.com/D-Programming-Language/dmd/blob/master/src/backend/dwarf.c#L1571, thus breaking the TYforward loop detection mechanism.