rust-lang / rust-lang/reference
Document raw pointer bit validity
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 607
- PR merge metrics
- PR metrics pending
Description
Currently, the reference does not provide any guarantees about which bit patterns constitute valid instances of raw pointers to Sized types (ie, thin pointers), and does not provide any guarantees about whether thin raw pointers can contain padding/uninitialized bytes. It would be good if both were guaranteed, e.g. for cases like https://github.com/google/zerocopy/pull/171.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Rust Reference sections that specify raw pointers and thin pointers, then review the linked zerocopy pull request for the motivating case. Document which bit patterns are valid for raw pointers to Sized types and whether thin raw pointers may contain padding or uninitialized bytes; the relevant reference guarantees should make both points explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100