-
Notifications
You must be signed in to change notification settings - Fork 10
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
Heads-up: UB due to misuse of mem::uninitialized will soon lead to panic #2
Comments
@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 rust-lang/rust#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 |
mitsuhiko
added a commit
to getsentry/symbolic
that referenced
this issue
Nov 12, 2020
dmsort 1.0 misuses `mem::uninitialized` which is now leading to a panic which causes problems for certain symbols. Refs emilk/drop-merge-sort#2
mitsuhiko
added a commit
to getsentry/symbolic
that referenced
this issue
Nov 12, 2020
dmsort 1.0 misuses `mem::uninitialized` which is now leading to a panic which causes problems for certain symbols. Refs emilk/drop-merge-sort#2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: