Closed RalfJung closed 3 years ago
@RalfJung, any chance to have a fix here ?
I'm not familiar with this library I am afraid. I am working on rustc and the library just showed up when we did our regression testing for this change. Cc https://github.com/rust-lang/rust/issues/66151
The library does not seem maintained any more; I am not sure what would be good replacements.
@ilaril made a beautiful fix, and I have released a 1.0.1
Here, this crate causes UB by "Producing an invalid value". Concretely, it creates an arbitrary
T
withmem::uninitialized()
. In the near future the call tomem::uninitialized()
will panic to avoid UB, and our crater run determined that this crate will be affected.mem::uninitialized()
is deprecated since Rust 1.39. The intended replacement isMaybeUninit
, which tracks the possibility of uninitialized values at the type level to make sure the compiler does not make any false assumptions.