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

Keep provenance intact by avoiding ptr-int-ptr #185

Merged
merged 2 commits into from Aug 16, 2022

Commits on Jul 30, 2022

  1. Keep provenance intact by avoiding ptr-int-ptr

    once_cell is an extremely widely-used crate, so it would be very nice if
    it conformed to the stricted/simplest/checkable model we have for
    aliasing in Rust. To do this, we need to avoid creating a pointer from
    an integer by cast or transmute. Pointers created this way can be valid,
    but are a nightmare for a checker like Miri. The situation is generally
    explained by these docs: https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html
    
    This implementation is mostly gross because all the APIs that would make
    this ergonomic are behind #![feature(strict_provenance)]
    saethlin committed Jul 30, 2022
    Configuration menu
    Copy the full SHA
    ed7a1b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd413a9 View commit details
    Browse the repository at this point in the history