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
[soundness] Loop back-edge check (check_loop_backedge) fails to propagate moved alias state across iterations, allowing double-move data races #313
for i in 0..2 {
task worker(move m, done)
}
<-done
<-done
}
What the checker should say
error[HYB-E3001]: use of moved value: 'm' — value was moved in a previous loop iteration (O2.2)
What it actually said
0 diagnostics (the checker accepts the loop, allowing move m on iteration 0 without invalidating m for iteration 1, resulting in concurrent map write data races under go run -race).
Claimed severity
P0 — data race reachable in the checked subset
Anything else
/claim #
Root Cause Analysis:
In compiler/crates/hy-check/src/freeze.rs, check_loop_backedge validates local loan consistency within a single loop body but fails to propagate moved/invalidated state across loop back-edges into subsequent iterations. Consequently, a variable moved inside a loop body can be reused or re-moved in subsequent iterations without triggering HYB-E3001.
Submitting a fix PR for #313 that ensures check_loop_backedge and FnState::scope_pop properly propagate moved alias and may_share state across loop iterations, covered by 4 regression tests (cargo test --manifest-path compiler/Cargo.toml -p hy-check: 121/121 unit + 86/86 integration tests passing).
Activity
gelismarvel commentedon Oct 17, 2026
/claim #313
Submitting a fix PR for #313 that ensures
check_loop_backedgeandFnState::scope_popproperly propagate moved alias andmay_sharestate across loop iterations, covered by 4 regression tests (cargo test --manifest-path compiler/Cargo.toml -p hy-check: 121/121 unit + 86/86 integration tests passing).fix(hy-check): propagate moved alias and may_share state across loop …
fix(hy-check): propagate moved alias and may_share state across loop …
fix(hy-check): propagate moved alias and may_share state across loop …
fix(hy-check): propagate moved alias and may_share state across loop …
fix(hy-check): propagate moved alias and may_share state across loop …
fix(hy-check): keep main's inner-move propagation on scope pop (limit…
Merge origin/main into fix/issue-313-loop-backedge-alias
dancerdan15 commentedon Oct 22, 2026
/attempt #313
hy-check: instantiate generic call return shapes and preserve block-e…