In conclusion, stack allocation must be destroyed

FeepingCreature feepingcreature at gmail.com
Mon Jul 18 17:45:08 UTC 2022


On Monday, 18 July 2022 at 16:19:20 UTC, Nick Treleaven wrote:
> On Monday, 18 July 2022 at 12:13:47 UTC, FeepingCreature wrote:
>> And D does not have extremely reliable escape analysis.
>
> Can you please post an example of @safe -dip1000 code that 
> allows memory corruption? (There is a known problem with 
> constructors with a PR to fix).
>
> Also I presume the bugs you're talking about aren't just due to 
> the `in` preview switch?

Why would I post an example of dip1000? dip1000 is not the 
default. If the compiler needs dip1000 to work correctly, that 
means the compiler is not working correctly.

The bug that triggered this is 
https://issues.dlang.org/show_bug.cgi?id=23170 , thankfully 
already fixed. I'm not optimistic it's the last one though.

DIP1000 is good, but if memory corruption in non-DIP1000 compiles 
is the cost of the transition, then the transition is being 
mishandled. Spurious compiler errors, fine, but a compiler update 
should not cause a very basic construct like [] to start 
corrupting values.


More information about the Digitalmars-d mailing list