[Issue 24734] New: Test DMD with bounds checking for Array.opIndex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 30 15:59:40 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24734

          Issue ID: 24734
           Summary: Test DMD with bounds checking for Array.opIndex
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: tim.dlang at t-online.de

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.

--


More information about the Digitalmars-d-bugs mailing list