Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of problematic realloc patterns #33

Open
brooksdavis opened this issue Apr 28, 2022 · 0 comments
Open

Add an example of problematic realloc patterns #33

brooksdavis opened this issue Apr 28, 2022 · 0 comments

Comments

@brooksdavis
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant