Choosing an Approach for the Template Lowering of _d_arrayctor

Stanislav Blinov stanislav.blinov at gmail.com
Fri Nov 26 11:59:37 UTC 2021


On Friday, 26 November 2021 at 02:42:23 UTC, kinke wrote:
> On Thursday, 25 November 2021 at 19:58:11 UTC, Stanislav Blinov 
> wrote:
>> I'm just not expressing myself clearly :) This won't be a 
>> compile error. The `emplaceInitializer` above would plop a 
>> null context pointer into `it`, which, if the destructor 
>> actually accesses context, naturally would lead to a segfault 
>> in __ArrayDtor.
>
> Note that this is exactly the current behavior of 
> intimately-related .dup for non-POD slices: 
> https://github.com/dlang/druntime/blob/595707b1ac8a439b2a7243b0abf95d4bc56239ff/src/object.d#L3601-L3627

https://issues.dlang.org/show_bug.cgi?id=22547


More information about the Digitalmars-d mailing list