Thread overview
[Issue 23202] catch null dereferences at compille time
Jun 21, 2022
Dennis
Dec 17, 2022
Iain Buclaw
June 21, 2022
https://issues.dlang.org/show_bug.cgi?id=23202

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel@live.nl
           Hardware|x86_64                      |All
            Summary|assigning class.tupleof     |catch null dereferences at
                   |with a string segfaults at  |compille time
                   |runtime, also with @safe    |
                 OS|Linux                       |All
           Severity|normal                      |enhancement

--- Comment #1 from Dennis <dkorpel@live.nl> ---
S.init is `null`, which you dereference by accessing a member. `@safe` does not prevent `null` dereferences, since those only abort the program, they don't corrupt memory. The code is essentially doing this:

```
auto s = (cast(S)null).str;
```

Changing this to an enhancement.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=23202

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 13
https://issues.dlang.org/show_bug.cgi?id=23202

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/20123

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--