Bug 23911 – "Overlapping arrays in copy:" error message gone

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-05-10T13:55:13Z
Last change time
2024-12-13T19:28:48Z
Keywords
diagnostic
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#20277 →

Comments

Comment #0 by dlang-bugzilla — 2023-05-10T13:55:13Z
////////// bug.d ///////// void main() { auto c = new char[10]; c[0..6] = c[4 .. 10]; } ////////////////////////// This program used to produce a more useful error message. With 2.080: object.Error@(0): Overlapping arrays in copy: 2 byte(s) overlap of 6 ---------------- ??:? nothrow @safe void rt.util.array._enforceNoOverlap(const(char[]), ulong, ulong, const(ulong)) [0xd88da756] ??:? _d_arraycopy [0xd88d87ba] ??:? _Dmain [0xd88d8699] However, this is gone in 2.084 or later. Current versions just produce a nondescript "Range violation", which isn't even accurate, as all the indices are in-range. Even though one would expect the test to be in Druntime, bisection shows this to be a DMD regression. Introduced in https://github.com/dlang/dmd/pull/7867
Comment #1 by razvan.nitu1305 — 2023-05-11T08:51:20Z
This is probably a druntime error, as the runtime is the one that outputs the assertion message.
Comment #2 by dlang-bugzilla — 2023-05-11T08:52:43Z
OK, just note the last paragraph in the description.
Comment #3 by razvan.nitu1305 — 2023-05-11T09:00:38Z
Noted, thanks!
Comment #4 by razvan.nitu1305 — 2023-05-11T09:11:35Z
After looking at the code, it seems indeed that this is a gluelayer issue.
Comment #5 by robert.schadek — 2024-12-13T19:28:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20277 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB