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

Restrict MaybeUninit trait impls to fix soundness #309

Merged
merged 1 commit into from
Sep 2, 2023

Commits on Sep 2, 2023

  1. Restrict MaybeUninit trait impls to fix soundness

    Previously, we implemented `FromZeroes` and `FromBytes` for
    `MaybeUninit<T>` with no bound on `T`. This resulted in a soundness hole
    in which `T` - and thus `MaybeUninit<T>` - could contain an
    `UnsafeCell`, which is a violation of the contracts of `FromZeroes` and
    `FromBytes`.
    
    This is a breaking change, but it's very unlikely to be one that code is
    currently relying on. In this commit, we publish 0.6.4, and we will yank
    all preceding 0.6.x versions as soon as 0.6.4 is published.
    
    This is a backport of #308
    joshlf committed Sep 2, 2023
    Configuration menu
    Copy the full SHA
    dfe2537 View commit details
    Browse the repository at this point in the history