You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
-Z uninit-checks: pointers to trait objects are unsupported #5166
With -Z uninit-checks, any access through a pointer to a trait object fails with an unsupported check, even when nothing uninitialized is involved:
use std::fmt::Debug;#[kani::proof]fnsize_of_val_dyn(){let x:u32 = kani::any();let o:&dynDebug = &x;assert_eq!(std::mem::size_of_val(o),4);}
$ kani dynp.rs # VERIFICATION:- SUCCESSFUL
$ kani dynp.rs -Z uninit-checks # Failed Checks: Kani does not support reasoning about memory initialization of pointers to trait objects.
Kani 0.68.0 at c5e65fd (nightly-2026-10-23), CBMC 6.11.0.
This blocks uninit checking on verify-rust-std's Challenge 2 solution (model-checking/verify-rust-std#649): its vtable_size, vtable_align, size_of_val_dyn and align_of_val_dyn harnesses all fail this way (14 harnesses). "Add support for trait objects" is an unchecked item in #3300 without its own issue, so this one tracks it.
Activity