DIP1000 finds stack corruption bug in std.socket

Olivier FAURE couteaubleu at gmail.com
Tue Mar 19 11:29:57 UTC 2019


On Tuesday, 19 March 2019 at 04:25:30 UTC, Walter Bright wrote:
> https://github.com/dlang/phobos/pull/6919
>
> The function returns a pointer to a local variable. The 
> pre-DIP1000 code circumvented the compiler error message by 
> passing the address through another variable. DIP1000 tracks 
> the lifetimes across assignments, exposing such shenanigans.
>
> These sorts of bugs can be very hard to track down by their 
> effects.

I don't want to be aggressive, but this feels like you're saying 
"Look at how amazing DIP-1000 is! Isn't it great?" right after 
criticisms of DIP-1000 have started to surface again.

I get that you're very proud of DIP-1000, and that it's a lot 
better than having only DIP-25, but it still leaves the concept 
of scope in D with fundamental flaws, that make full @safe @nogc 
apps next to impossible.


More information about the Digitalmars-d mailing list