Issue 24734 - Test DMD with bounds checking for Array.opIndex
Summary: Test DMD with bounds checking for Array.opIndex
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-30 15:59 UTC by Tim
Modified: 2024-08-30 15:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Tim 2024-08-30 15:59:40 UTC
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.