[Issue 9834] New: template+class+FunctionLiteral=AccessViolation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 30 04:49:15 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9834

           Summary: template+class+FunctionLiteral=AccessViolation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: zan77137 at nifty.com


--- Comment #0 from SHOO <zan77137 at nifty.com> 2013-03-30 04:49:12 PDT ---
This code makes AccessViolation on git master head:
-------------------
struct Event()
{
    void delegate() dg;

    void set(void delegate() handler)
    {
        dg = handler;
    }

    void call()
    {
        dg();
    }
}


void main()
{
    Event!() ev;
    auto a = new class
    {
        Object o;
        this()
        {
            o = new Object;
            ev.set((){o.toString();});
        }
    };
    ev.call();
}
-------------------
$ dmd -run main
object.Error: Access Violation
----------------
0x004020A5
0x00402128
0x00402057
0x004029EC
0x00402A27
0x00402625
0x00402140
0x769133AA in BaseThreadInitThunk
0x774E9EF2 in RtlInitializeExceptionChain
0x774E9EC5 in RtlInitializeExceptionChain



And, following is git bisect result:
$ git bisect bad
67fbf5753e9d4a276c354e952ed2f888efcb714c is the first bad commit

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list