[Issue 21936] New: [REG 2.080.1] Segfault when compiled with -dip1000

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 20 17:57:47 UTC 2021


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

          Issue ID: 21936
           Summary: [REG 2.080.1] Segfault when compiled with -dip1000
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: uplink.coder at googlemail.com

When the following code is compiled with -dip1000 the compiler segfaults.

struct Handlers {
    void registerType(T)()
    {
        registerConstructors!T;
    }    void registerConstructors(T)()
    {
        constructImplicit!T;
    }
}// Handlersauto constructImplicit(T)(T.init.tupleof)
{
}
import std.datetime;
void registerHandlersDateTime(Handlers handlers)
{
        handlers.registerType!MonoTime;
}

The reason is that everything is marked @safe when compiled with -dip1000
causing setUnsafe to be called on a null pointer in dmd.access.checkAccess.

--


More information about the Digitalmars-d-bugs mailing list