microsoft / microsoft/litebox

Remove all the `transmute`s

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority-low
Dominant language
Rust
Stars
2.7k
Forks
144
Avg merge
12h 21m
Merged PRs (30d)
146

Description

There are some transmutes, and more being added (e.g., https://github.com/MSRSSP/litebox/pull/144), which seem to imply that the `RawPointerProvider` interface needs some improvement, since as it currently stands, such transmutes can be unsound (they are being added to the shim, which (as an example) is unaware of the _actual_ size of the `Platform::Raw*Pointer`, and needs to stay parametric over it).

If we added some more constraints, this would possibly be fine, but adding such constraints could also instead be done by adding some transitions to/from actual raw Rust pointers with a safer interface.

Not a high-priority, but just wanted to open a tracking issue as a reminder.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the RawPointerProvider interface, the shim, and the changes in PR #144 first. Determine whether safer transitions to raw Rust pointers or additional constraints are intended; done means the transmutes are removed without losing the shim's parametric behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.