Skip to content

Catch basic array bounds errors #3771

Open

Description

Here:
https://www.youtube.com/watch?v=KpdSFZOQCl8&t=26m45s

They they show a PVS-Studio is able to catch statically a C++ bug similar to this:

fn foo(v: &mut [u32; 6]) {
    for i in 0 ..= 6 {
        v[i] += 1;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-hardCall for participation: This a hard problem and requires more experience or effort to work onL-correctnessLint: Belongs in the correctness lint groupT-MIRType: This lint will require working with the MIR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions