www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1518] New: Crash using 'scope', 'with' and undefined 'RegExp'

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

           Summary: Crash using 'scope', 'with' and undefined 'RegExp'
           Product: D
           Version: 2.004
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: regan netmail.co.nz


//Compiling this results in a DMD crash.

void main()
{
        int i;
        scope(exit) i++;
        with(new RegExp(``)) {}
}

E:\D\src\tmp>dmd -v bug002.d
parse     bug002
semantic  bug002
import    object        (E:\D\dmd\bin\..\src\phobos\object.d)
semantic2 bug002
semantic3 bug002
bug002.d(5): Error: identifier 'RegExp' is not defined
bug002.d(5): Error: RegExp is used as a type
bug002.d(5): Error: new can only create structs, dynamic arrays or class
objects
, not void's
bug002.d(5): Error: with expressions must be class objects, not 'void*'

<crash>


-- 
Sep 19 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1518


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All





Added to DStress as
http://dstress.kuehne.cn/run/s/scope_19_A.d
http://dstress.kuehne.cn/nocompile/s/scope_19_B.d
http://dstress.kuehne.cn/run/s/scope_19_C.d
http://dstress.kuehne.cn/run/s/scope_19_D.d
http://dstress.kuehne.cn/nocompile/s/scope_19_E.d
http://dstress.kuehne.cn/nocompile/s/scope_19_F.d


-- 
Sep 30 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1518






a patch to fix
statement.c 3213

int TryFinallyStatement::fallOffEnd()
{   
    if (body)
        return body->fallOffEnd();
    else
        return TRUE;
}


-- 
Nov 08 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1518






-------
This error had been fixed in DMD 1.029 or before by applying the patch. 

A version between 1.030 and 1.033 has introduced the regression that
http://dstress.kuehne.cn/nocompile/s/scope_19_B.d segfaults on invalid again.


-- 
Jul 12 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1518


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed dmd 1.038 amd 2.022


-- 
Dec 25 2008