Thread overview
[Issue 14046] Overlapping dynamic array copy is allowed if struct contains postblit
Jan 26, 2015
Denis Shelomovskij
Dec 17, 2022
Iain Buclaw
January 26, 2015
https://issues.dlang.org/show_bug.cgi?id=14046

--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> ---
The reason is in case there is no postblit `_d_arraycopy` (which enforces arrays don't overlap [1]) is called for copying and if there is a postblit `_d_arrayassign` (which allows overlapping arrays [2]) is called.

[1] https://github.com/D-Programming-Language/druntime/blob/a8c74e00fe21e7781bc6d6fa1773c12b7a1e63b7/src/rt/arraycat.d#L26 [2] https://github.com/D-Programming-Language/druntime/blob/a8c74e00fe21e7781bc6d6fa1773c12b7a1e63b7/src/rt/arrayassign.d#L28

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

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 07
https://issues.dlang.org/show_bug.cgi?id=14046

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

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

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

--