Skip to content

CBMC should have a r_ok primitive that is indexed by number of elements, not number of bytes #6751

Open
@danielsn

Description

@danielsn

Often, we want to check that we can read the nth element of an array. Currently, we need __CPROVER_r_ok(ptr, index * sizeof(*ptr)), which can lead to overflow issues and weird error messages to users. Instead, we would like

__CPROVER_r_ok_array(ptr, num_elements)

Feel free to bikeshed the name!

Metadata

Metadata

Assignees

No one assigned

    Labels

    KaniBugs or features of importance to Kani Rust VerifierPointer ModellingawsBugs or features of importance to AWS CBMC usersfeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions