Repository navigation
Challenge 29: restore the contract on Box<MaybeUninit<T>>::assume_init - #795
Open
sankalpsthakur wants to merge 1 commit into
Open
sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
kani#4984 is fixed by kani#4985, which the pinned Kani includes, so the sized assume_init can carry its requires/ensures again. Replace the assume_init_mirror proofs with proof_for_contract harnesses for i32, bool and ().
feliperodri
approved these changes
Nov 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
item 1 from @feliperodri's comment on #526 after #639 merged: restore the contract on the sized
Box<MaybeUninit<T>>::assume_initmodel-checking/kani#4984 is fixed by model-checking/kani#4985, and main's current Kani pin (
9834c96, from #784) includes it, so the contract can go back on theconst fnwhat changed
library/alloc/src/boxed.rs: drop the kani#4984 TODO and attach therequires/ensuresthat were commented out under it, unchangedassume_init_mirrorhelper and its three#[kani::proof]harnesses with#[kani::proof_for_contract(Box::<core::mem::MaybeUninit<T>, A>::assume_init)]harnesses fori32,booland(), same names (check_assume_init_{i32,bool,zst}) and the samecover_reached()witness as the other contract harnesses inmod verifyvalidation
not run locally, PR CI runs the harnesses with the pinned Kani
part of #526. the challenge stays open until items 2 (
-Z valid-value-checksin CI) and 3 (the ruling in #733) are done and the resolve PR landsi used an ai coding assistant to help write this change and reviewed it myself
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.