digitalmars.D.bugs - [Issue 21936] New: [REG 2.080.1] Segfault when compiled with -dip1000
- d-bugmail puremagic.com (33/33) May 20 2021 https://issues.dlang.org/show_bug.cgi?id=21936
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 puremagic.com Reporter: uplink.coder 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. --
May 20 2021