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 niche-encoded enums (e.g. TryReserveErrorKind) are unsupported #5165
With -Z uninit-checks, every Vec/VecDeque growth path fails with
Kani currently doesn't support checking memory initialization for pointers to `collections::TryReserveErrorKind. Cannot determine layout for an Enum with niche encoding of type collections::TryReserveErrorKind
TryReserveErrorKind (CapacityOverflow | AllocError { layout, non_exhaustive }) uses the niche in Layout's alignment. It's reached from RawVec::grow_amortized/try_reserve, so reserve, push, append, resize_with etc. all hit it. In verify-rust-std #681 it fails 4 harnesses directly.
The #3300 checklist has "enums with variants that have different padding"; this is the niche-encoded case, which is likely the more common one in std (Option<NonNull<_>>, Result<_, TryReserveError>, Option<Layout>). The same harnesses also report "Interaction between raw pointers and unions is not yet supported", which #3300 already tracks ("Unions can serve as a pointee of raw pointers").
Reproducer (confirmed on c5e65fd; verifies without the flag):
With -Z uninit-checks this reports the niche-enum check above, plus unsupported caller_location (#374), integer_max and cold_path (#5164) and "pointer to unallocated memory".
Activity