Bug 2315 – DMD Stack Overflow on unwanted ctfe recursion

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-08-26T18:18:00Z
Last change time
2014-03-01T00:36:09Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
benoit

Comments

Comment #0 by benoit — 2008-08-26T18:18:35Z
Object[] ARR_; Object[] ARR(){ if( ARR is null ) // type forgotten underscore ARR_ = [ new Object() ]; return ARR_; } const Object O1 = ARR[1]; // invalid code // results on linux in segmentation fault
Comment #1 by bugzilla — 2008-08-27T00:01:56Z
If I put a limit on recursion in CTFE, then someone will file a bug report on the limit. I also don't know why this is marked as critical, as removing the bug in the code will allow it to work.
Comment #2 by benoit — 2008-08-27T03:45:47Z
I marked it as critical because of the crash. A solution can be a message in -v mode
Comment #3 by smjg — 2008-11-24T09:57:36Z
This is in the same area as issue 1071 and possibly others, and could be dealt with in the same way (see the comments there). Done well, nobody should have any reason to file a counter-bug to this.
Comment #4 by bugzilla — 2011-09-30T16:02:08Z