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

Bug: handling of indexing in unsafe code is unsound #583

Open
Nadrieril opened this issue Mar 7, 2025 · 0 comments
Open

Bug: handling of indexing in unsafe code is unsound #583

Nadrieril opened this issue Mar 7, 2025 · 0 comments
Labels
C-bug A bug in charon

Comments

@Nadrieril
Copy link
Member

Currently we translate a Index place expression to a function call on a borrow of that place. This is not-strictly-correct wrt retags for safe code, and actually unsound if the access is behind a raw pointer.

We should only do this for references, and put that behavior behind a flag, along with other reconstructions we do that don't make sense for users who want precisely accurate MIR.

@Nadrieril Nadrieril added the C-bug A bug in charon label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug A bug in charon
Projects
None yet
Development

No branches or pull requests

1 participant