[Issue 21110] New: OOB memory access, safety violation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 4 05:50:36 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21110
Issue ID: 21110
Summary: OOB memory access, safety violation
Product: D
Version: D2
Hardware: x86_64
OS: Other
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bcarneal11 at gmail.com
void main() {
import std.stdio : writeln;
int[] dst;
int[] a;
int[] b;
a.length = 3;
b.length = 3;
dst.length = 4;
dst[] = a[] + b[];
writeln(dst[3]);
}
Prior to 2.077, per Steven Schveighoffer, the above safely failed with an array
violation. Currently on his and my test machines, the above runs to completion
printing out some number (402696894 on my machine, 402653184 on his).
Annotating main with @safe didn't change anything.
--
More information about the Digitalmars-d-bugs
mailing list