Bug 1054 – regression: circular aliases cause compiler stack overflow

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-03-12T01:24:00Z
Last change time
2014-02-16T15:21:30Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
thomas-dloop

Comments

Comment #0 by thomas-dloop — 2007-03-12T01:24:53Z
# alias a b; # alias b a; # # b x; dmd -c a.d -> segfaults # alias a b; # alias b a; dmd -c a.d -> compiles even though it shouldn't test cases: http://dstress.kuehne.cn/nocompile/a/alias_30_G.d http://dstress.kuehne.cn/nocompile/a/alias_30_J.d http://dstress.kuehne.cn/nocompile/a/alias_30_K.d http://dstress.kuehne.cn/nocompile/e/enum_44_E.d
Comment #1 by thomas-dloop — 2007-03-29T14:08:45Z
*** Bug 1063 has been marked as a duplicate of this bug. ***
Comment #2 by clugdbug — 2009-04-03T02:28:50Z
The first case no longer segfaults -- it stack overflows instead, and the second case now generates an error. On DMD1.042, the first case displays: fog.d(2): Error: alias fog.a recursive alias declaration Stack overflow and on DMD2.027, it gets caught in an infinite loop: fog.d(2): Error: alias fog.a recursive alias declaration fog.d(2): Error: alias fog.a recursive alias declaration fog.d(2): Error: alias fog.a recursive alias declaration fog.d(2): Error: alias fog.a recursive alias declaration fog.d(2): Error: alias fog.a recursive alias declaration
Comment #3 by clugdbug — 2009-05-14T05:26:01Z
This is fixed in DMD2.030, but not in DMD1.045. alias a b; alias b a; a y; --- ice.d(544): Error: alias ice.a recursive alias declaration Stack overflow ----------
Comment #4 by bugzilla — 2009-07-09T02:53:56Z
Fixed dmd 1.046