Skip to content

Test DMD with bounds checking for Array.opIndex #5538

Open
@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Tim reported this on 2024-08-30T15:59:40Z

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

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions