Skip to content

iter_vec_raw has undefined behaviour with fixed-size arrays of zero-size types #9890

Closed
@thestinger

Description

@thestinger

It indexes past the end of the object with inbounds GEP. This function should likely special case zero-size types and use a counter, like the library implementation of an iterator does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions