This repository has been archived by the owner on Feb 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Undefined Behavior when T contains uninit bytes #3
Comments
It appears that unconditionally using MaybeUninit::zeroed() in Stowaway::new() is enough to fix this. |
Ah, yes, I was a bit worried about this. I guess those bytes are allowed to be uninit even though they're still "read" whenever the structure is copied, because they're never "used". |
This was referenced Apr 8, 2020
RustyYato
added a commit
to RustyYato/stowaway
that referenced
this issue
Apr 8, 2020
reorganize tests remove faulty test from Lucretiel#3
RustyYato
added a commit
to RustyYato/stowaway
that referenced
this issue
Apr 10, 2020
removed bad tests from Lucretiel#3
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d75fb532da27fbb22467a2b3b9439119
Use Tools -> Miri, it detects undefined behavior in Stowaway::new.
The text was updated successfully, but these errors were encountered: