[Issue 19831] New: throw/catch in scope(exit) crashes with illegal instruction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 26 14:23:52 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19831

          Issue ID: 19831
           Summary: throw/catch in scope(exit) crashes with illegal
                    instruction
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de

Since DMD 2.076, the following code crashes with a segfault or illegal
instruction:

import std.stdio;

void foo() {
    try throw new Exception("");
    catch (Exception ex) writefln("got ex %s", ex);
}

void main() {
    scope(exit) foo();
    writeln("Hello D");
    throw new Exception("Foob");
}

It worked in all previous versions back to 2.060.

--


More information about the Digitalmars-d-bugs mailing list