-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict MaybeUninit trait impls to fix soundness (#308)
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, especially given that the 0.7.x release train was published very recently. Thus, in this commit, we publish 0.7.3, and we will yank 0.7.{0,1,2} as soon as 0.7.3 is published. Fixes #299
- Loading branch information
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
[package] | ||
edition = "2021" | ||
name = "zerocopy" | ||
version = "0.7.2" | ||
version = "0.7.3" | ||
authors = ["Joshua Liebow-Feeser <[email protected]>"] | ||
description = "Utilities for zero-copy parsing and serialization" | ||
license = "BSD-2-Clause" | ||
|
@@ -55,7 +55,7 @@ simd-nightly = ["simd"] | |
__internal_use_only_features_that_work_on_stable = ["alloc", "simd"] | ||
|
||
[dependencies] | ||
zerocopy-derive = { version = "=0.7.2", path = "zerocopy-derive", optional = true } | ||
zerocopy-derive = { version = "=0.7.3", path = "zerocopy-derive", optional = true } | ||
|
||
[dependencies.byteorder] | ||
version = "1.3" | ||
|
@@ -66,7 +66,7 @@ optional = true | |
# zerocopy-derive remain equal, even if the 'derive' feature isn't used. | ||
# See: https://github.com/matklad/macro-dep-test | ||
[target.'cfg(any())'.dependencies] | ||
zerocopy-derive = { version = "=0.7.2", path = "zerocopy-derive" } | ||
zerocopy-derive = { version = "=0.7.3", path = "zerocopy-derive" } | ||
|
||
[dev-dependencies] | ||
rand = "0.6" | ||
|
@@ -78,4 +78,4 @@ static_assertions = "1.1" | |
# CI test failures. | ||
trybuild = "=1.0.80" | ||
# In tests, unlike in production, zerocopy-derive is not optional | ||
zerocopy-derive = { version = "=0.7.2", path = "zerocopy-derive" } | ||
zerocopy-derive = { version = "=0.7.3", path = "zerocopy-derive" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
[package] | ||
edition = "2021" | ||
name = "zerocopy-derive" | ||
version = "0.7.2" | ||
version = "0.7.3" | ||
authors = ["Joshua Liebow-Feeser <[email protected]>"] | ||
description = "Custom derive for traits from the zerocopy crate" | ||
license = "BSD-2-Clause" | ||
|