[Issue 8612] ICE(struct.c) struct alignment failure for delegate in catch block referring to the catched exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 7 14:39:26 PDT 2013


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


Jeremie Pelletier <jeremiep at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeremiep at gmail.com


--- Comment #2 from Jeremie Pelletier <jeremiep at gmail.com> 2013-09-07 14:39:24 PDT ---
A quick workaround is to call a function from the catch block which handles the
delegate:

void main() {
    try throw new Exception("catch me");
    catch(Exception e) {
         doSomething(e);
         auto dg = { throw e; } // this delegate will crash dmd
    }
}

void doSomething(Exception e) {
     auto dg = { throw e; }; // this delegate won't crash dmd
}

-- 
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