D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7127 - Const-related infinite recursion in DWARF generation
Summary: Const-related infinite recursion in DWARF generation
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 major
Assignee: No Owner
URL:
Keywords: patch
: 5533 7031 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-12-18 07:09 UTC by David Nadlinger
Modified: 2011-12-19 10:08 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description David Nadlinger 2011-12-18 07:09:08 UTC
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.
Comment 2 David Nadlinger 2011-12-19 10:08:15 UTC
*** Issue 5533 has been marked as a duplicate of this issue. ***
Comment 3 David Nadlinger 2011-12-19 10:08:35 UTC
*** Issue 7031 has been marked as a duplicate of this issue. ***