-
Notifications
You must be signed in to change notification settings - Fork 4
small uninitialized types are unsound #8
Comments
Can you create a PR with a test case that fails in miri so that I can investigate further and protect against future regressions? |
Sure |
removed bad tests from Lucretiel#3
add tests for uninit behavior as per #8
FWIW, it appears that the issue isn't that MIRI doesn't copy the uninitialized bytes, but that it doesn't consider filling a uninitialized int with them as UB until the int is "used" in some way. However, this is considered a bug in MIRI (rust-lang/miri#1340), so the unsoundness is still unsound. I'll be publishing a PR later today and I'd love if you could review it. |
Cool, I wasn't aware of that! Thanks for the link. |
There's also a lot of good discussion in the answer & comments of the stackoverflow question I posted on this topic, especially related to the current progress in defining the soundness rules for this sort of thing. |
Published 2.0.0 |
Similar to #3, but it can't be fixed by zeroing beforehand
The text was updated successfully, but these errors were encountered: