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-all: select and tuple-await lowering move a Task handle then read it; tuple-await unwind never releases the other tasks; use after .await vs spec #2011
Exposed by the #1993 validator rule (wave-cancel, bf1b6f6: mir_read_of_moved_owned_local rejects a read of a non-Copy owned local every path already moved out). lower_single_await was fixed in the same commit (29 → 10 verdicts over the async/cancel/defer corpus). The remaining reds under with check <file> --validate-all (all pass at run time; the battery does not run validate-all over these corpora):
1. select lowering (MirLower select arms, the second FIBER_AWAIT site) moves the task into the select intrinsic (call (move _2, move _4)), again into the winner's FIBER_AWAIT (move _2, const 1), and into both the loser's cancel and cleanup await (move _2, move _2). Same discipline as lower_single_await should apply: observe with copy, take once per path.
2. tuple await unwind leaks the other tasks (test/spec/spec_ss14_async_await.w parallel_tuple_await): (left_task, right_task).await — on self-cancel during the left await the unwind cancels and cleans up _1 and reaches StorageDead(_3) with the right task never cancelled or joined: "owned local _3 is still Init at return". Previously masked by the first verdict on the file.
3. Use after .await: spec vs pinned test. §22 (concurrency.md, ephemeral example): t.await // OK: consumes the task. test/spec/spec_ss14_7_task_is_done.w (#637) pins assert(t2.await == 2); assert(t2.is_done()), and spec_ss14_7_task_was_cancelled.w reads the task after awaiting it; Sema accepts both, so the MIR reads _22 after the await's _28 = move _22. Either Sema rejects a use after .await (spec as written; the tests change) or .await observes and the spec sentence changes — needs a ruling.
Also red under validate-all in that corpus, other rules, not from #1993: errdefer_basic/ordering/question_mark ("reset of _3 on a path where it was never moved"), da_gen_push_pipeline_stages (drop after move), spec_ss07_3a_implicit_context (copy into consuming param), spec_ss14_22_task_ephemerality (MIR lowering failed).
Activity
An intrinsic call's tag goes on its own call, set before its terminat…
select await takes each task once per arm path; arm temporaries drop …
A cancelled tuple await releases the tasks it has not reached yet (#2011
`.await` consumes the task: a later read is a use of a moved value (#…
#2011's pre-existing validate-all reds, each at its root (#2011)
Battery lane validate-all-async: the async/cancel/defer corpus under …
validate-all lane: a fixture's check keeps only its compile-configuri…
An intrinsic call's tag goes on its own call, set before its terminat…
select await takes each task once per arm path; arm temporaries drop …
A cancelled tuple await releases the tasks it has not reached yet (#2011
`.await` consumes the task: a later read is a use of a moved value (#…
#2011's pre-existing validate-all reds, each at its root (#2011)
Battery lane validate-all-async: the async/cancel/defer corpus under …
validate-all lane: a fixture's check keeps only its compile-configuri…
An intrinsic call's tag goes on its own call, set before its terminat…
1 remaining item
A cancelled tuple await releases the tasks it has not reached yet (#2011
`.await` consumes the task: a later read is a use of a moved value (#…
#2011's pre-existing validate-all reds, each at its root (#2011)
Battery lane validate-all-async: the async/cancel/defer corpus under …
validate-all lane: a fixture's check keeps only its compile-configuri…
An intrinsic call's tag goes on its own call, set before its terminat…
select await takes each task once per arm path; arm temporaries drop …
A cancelled tuple await releases the tasks it has not reached yet (#2011
`.await` consumes the task: a later read is a use of a moved value (#…
#2011's pre-existing validate-all reds, each at its root (#2011)
Battery lane validate-all-async: the async/cancel/defer corpus under …
validate-all lane: a fixture's check keeps only its compile-configuri…
Cancellation: indirect callees that may suspend get the cancelled-ret…
ehartford commentedon Oct 4, 2026
Fixed on main in 8cc883a (stack #2072, ten PRs; seed-driven battery GREEN on 92add22, tree identical to main).