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

Need iterators over unsafe buffers #2183

Closed
brson opened this issue Apr 10, 2012 · 0 comments
Closed

Need iterators over unsafe buffers #2183

brson opened this issue Apr 10, 2012 · 0 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Apr 10, 2012

In particular the case came up recently where somebody had an unsafe pointer to an array of null terminated character pointers, but didn't know how long it is. We should be able to write:

let buflen = unsafe { position(buf) {|i| i == ptr::null() } };
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
…RalfJung

adjust for better provenance control

This is the Miri side of rust-lang#97684.
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants