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

Miri complains about pointer dereferencing in nom_locate #535

Closed
matzemathics opened this issue Sep 18, 2024 · 2 comments · Fixed by #537
Closed

Miri complains about pointer dereferencing in nom_locate #535

matzemathics opened this issue Sep 18, 2024 · 2 comments · Fixed by #537
Assignees
Labels
infrastructure Build/CI/packaging infrastructure Parser Rule-Parser-Related Issue question Further information is requested
Milestone

Comments

@matzemathics
Copy link
Collaborator

The CI on the parser branch currently fails due to miri complaining about a pointer dereference in nom_locate. Specifically, extending a slice backwards to its original size is impossible in the current (experimental) aliasing model checked by miri.

Also note that the violation is not due to unsafe code in the nemo crate -- miri fails on the tests inside nom_locate and even on the example provided in the nom_locate docs, so this is not something we can currently fix.

@matzemathics matzemathics added question Further information is requested Parser Rule-Parser-Related Issue infrastructure Build/CI/packaging infrastructure labels Sep 18, 2024
@matzemathics
Copy link
Collaborator Author

There is some discussion whether such pointer operations should be considered safe: rust-lang/unsafe-code-guidelines#134.

@matzemathics
Copy link
Collaborator Author

Given the small size of the nom_locate crate, I feel I should be able to cook up a solution that satisfies miri pretty quickly.

@monsterkrampe monsterkrampe added this to the Release 0.6.0 milestone Sep 18, 2024
@matzemathics matzemathics linked a pull request Sep 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Build/CI/packaging infrastructure Parser Rule-Parser-Related Issue question Further information is requested
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants