www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21936] New: [REG 2.080.1] Segfault when compiled with -dip1000


          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 puremagic.com
          Reporter: uplink.coder googlemail.com

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

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

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.

May 20 2021