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 passes a whole-enum drop after a variant payload moved out on one path (#1363 was validate-all: ok) #1394
Tool silence found by #1363. For let t = read_file(p).unwrap_or(""), with check repro.w --validate-all and --validate-ownership both print ok over this MIR (origin/main 8c859a7):
bb2: _6 = move _4<as v0>.f0; // payload moved out (success path)
bb4: drop(_4) @ drop#9 scope-exit _4; // whole-enum drop glue frees it again
--dump-drop-plan even classifies it: bb4.stmt9 place=_4 ty=ty428 state_before=Maybe action=conditional, with _4<as v0>.f0=Maybe — yet codegen emits an unconditional __drop_struct_428(ptr %3) and nothing reports the conflict.
Two gaps:
validate_ownership_body (src/MirCore.w) checks a Drop only for MaybeGarbage/Uninit. It should reject a whole-place Drop while a projected sub-place of that place is Moved/Maybe and was never re-initialized (reset-on-move, §2.5.1, re-inits it to Init) — the codegen has no drop flag for that case. The rule needs care: a whole-local conditional move sets the local and all children alike; the defect shape is a child more-moved than its parent chain.
Also fixed in the #1363 PR: the debug allocator was silent on the str double free (with_str_free skipped a freed block as "not owned"); it now consults the ledger.
Activity
MirLower: a user carrier's `?` retires branch()'s ControlFlow temp — …
MirLower: a user carrier's `?` retires branch()'s ControlFlow temp — …
unwrap_or / unwrap_or_else / flatten no longer free the payload they …
validate-ownership: a drop that frees a sub-place moved out without a…
MirLower: a str comparison and an f-string interpolant observe their …
MirLower: a move out of a variant payload is reset-on-move; a failed …
MirLower: Result.context owns its message on both paths (#1394)
validate-ownership: a drop that frees a sub-place moved out without a…
MirLower: a str comparison and an f-string interpolant observe their …
MirLower: a move out of a variant payload is reset-on-move; a failed …
MirLower: Result.context owns its message on both paths (#1394)
validate-ownership: a drop that frees a sub-place moved out without a…
MirLower: a str comparison and an f-string interpolant observe their …
MirLower: a move out of a variant payload is reset-on-move; a failed …
MirLower: Result.context owns its message on both paths (#1394)
validate-ownership: a drop that frees a sub-place moved out without a…
MirLower: a str comparison and an f-string interpolant observe their …
MirLower: a move out of a variant payload is reset-on-move; a failed …
MirLower: Result.context owns its message on both paths (#1394)
validate-ownership rejects vacated payloads and moves through referen…
validate-ownership: a statement move of an already-moved place is rej…
validate-ownership: a statement move of an already-moved place is rej…
MIR: an owned temporary in an f-string hole is a statement temp, drop…
MIR: an owned temporary in an f-string hole is a statement temp, drop…
Test runner: a directive below the header is an error; pin the tuple-…
Type checker: D74 entry sources and chain moves, field-view bindings (#…