Bug 24734 – Test DMD with bounds checking for Array.opIndex

Status
NEW
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-08-30T15:59:40Z
Last change time
2024-12-13T19:37:09Z
Assigned to
No Owner
Creator
Tim
Moved to GitHub: dmd#20505 →

Comments

Comment #0 by tim.dlang — 2024-08-30T15:59:40Z
Currently dmd.root.array.Array.opIndex has no bounds checking enabled for performance. Adding `assert(i < length);` would have found https://issues.dlang.org/show_bug.cgi?id=24733 earlier. The automatic bounds checking for the buffer would not be enough, because the internal buffer was big enough.
Comment #1 by robert.schadek — 2024-12-13T19:37:09Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20505 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB