www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2315] New: DMD crash on unwanted ctfe recursion

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2315

           Summary: DMD crash on unwanted ctfe recursion
           Product: D
           Version: 1.034
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


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


-- 
Aug 26 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2315





------- Comment #1 from bugzilla digitalmars.com  2008-08-27 00:01 -------
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.


-- 
Aug 26 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2315





------- Comment #2 from benoit tionex.de  2008-08-27 03:45 -------
I marked it as critical because of the crash.
A solution can be a message in -v mode


-- 
Aug 27 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2315


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com




------- Comment #3 from smjg iname.com  2008-11-24 09:57 -------
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.


-- 
Nov 24 2008