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
validate-ownership is blind to leaks: an owned local still Init at a return passes validate-all (#1365 leak was 'ok') #1384
A tool that stayed silent (CLAUDE.md): on #1365 repro 1 the failing let-else path returned with the materialized subject _3: Result[i32, str] still Init and no drop, and --validate-all said validate-all: ok. validate_ownership_body (src/MirCore.w) only rejects drops that reach Uninit/MaybeGarbage places; nothing checks the converse — an owned (type_needs_drop) local that is definitely Init at a TK_RETURN (or leaves its scope on a break/continue edge) without a drop, move, or reset.
and --dump-drop-state shows bb3 out: ... _3=Init. The debug allocator caught it (leak count=1); the validator did not.
What a check has to handle so it is not noise:
reset-on-move blanks (_2 = const zst) leave the place Init in the drop-state lattice although it owns nothing — the lattice needs a Blanked/zeroed state, or the check must treat a zst/zero assign as a move;
the return local _0, share-place (IndirectPlace) parameters, and view locals own nothing;
partially moved aggregates (moved-field exclusions).
Filed from #1365 rather than landed with it: #1365 is a drop-scheduling fix that must sit alone in its batch, and PR #1353 is reworking the drop-state pass storage this check would extend. The #1365 PR adds the let-else family to tools/drop_audit.w (40 cells) so that region is no longer uncovered.
Fixed by #1718: validate-ownership has a leak rule (an owned local some drop targets, still Init at a return with no sub-place moved or reset, is reported). Verified on main 3ccb998: #1365's shape is now reported by check --validate-all. That report exposed a let-else lowering defect, tracked as #1750.
Activity
let-else: the failing path drops the whole subject before it diverges…
let-else: the failing path drops the whole subject before it diverges…
Ownership: validate-ownership sees leaks (Reset state); drop exactly …
ehartford commentedon Sep 26, 2026
Fixed by #1718: validate-ownership has a leak rule (an owned local some drop targets, still Init at a return with no sub-place moved or reset, is reported). Verified on main 3ccb998: #1365's shape is now reported by
check --validate-all. That report exposed a let-else lowering defect, tracked as #1750.Test runner: a directive below the header is an error; pin the tuple-…
Type checker: D74 entry sources and chain moves, field-view bindings (#…