Fix soundness of FromBytes::read_from_io#2320
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2320 +/- ##
==========================================
- Coverage 89.32% 89.31% -0.02%
==========================================
Files 16 16
Lines 6025 6045 +20
==========================================
+ Hits 5382 5399 +17
- Misses 643 646 +3 ☔ View full report in Codecov by Sentry. |
See google#2319. Backport of google#2320.
See google#2319. Backport of google#2320.
867129d to
a6bb505
Compare
See google#2319. Backport of google#2320. Includes a Miri test confirming the previous unsoundness.
See google#2319. Backport of google#2320. Includes a Miri test confirming the previous unsoundness.
a6bb505 to
9ab80be
Compare
|
I've confirmed that the new test fails Miri when run without the change in |
jswrenn
left a comment
There was a problem hiding this comment.
This looks reasonable to me. We really ought to update FromZeros::new_zeroed to match the disclaimers of MaybeUninit::zeroed, but that's a distinct issue from the one you're fixing and can be handled in a follow-up PR.
9ab80be to
0a9c7b6
Compare
joshlf
left a comment
There was a problem hiding this comment.
Awesome, thank you for catching this! Two small comment nits, but otherwise looks good.
0a9c7b6 to
ce321e2
Compare
See google#2319. Includes a Miri test confirming the previous unsoundness. gherrit-pr-id: Iede94c196c710c74d970c93935f1539e07446e50
ce321e2 to
dad322d
Compare
See google#2319. Includes a Miri test confirming the previous unsoundness. gherrit-pr-id: Iede94c196c710c74d970c93935f1539e07446e50
|
Backporting to 0.8 in #2358 |
See #2319. Includes a Miri test confirming the previous unsoundness. gherrit-pr-id: Iede94c196c710c74d970c93935f1539e07446e50 Co-authored-by: Alyssa Haroldsen <[email protected]>
See #2319.