Skip to content

Add an example of problematic realloc patterns #33

@brooksdavis

Description

@brooksdavis

While standard C makes virtually all non-trivial use of reallocI() undefined behavior, de facto C supports comparison and arithmetic of values freed by realloc. Some common patterns in these cases break in CHERI C due to lost or inappropriate provenance. I've detailed a (perhaps) overly simplistic example in this Rust-related discussion. We should add a similar example, perhaps with a more realistic use case updating multiple pointers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions