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
Commit e1831b2
Browse filesBrowse the repository at this point in the historyBrowse files
A third adversarial-verification pass on the #554 return-borrow work surfaced
two more reachable holes (and confirmed the interprocedural fixpoint is robust:
60-level wrapper chains, mutual recursion, and 3-cycles all terminate in ms and
summarise correctly).
- Slice-B `&` reassign (a PRE-EXISTING soundness bug, exposed by the #554 (c)
block being more correct): `r = &b` ended the binder's old loan
UNCONDITIONALLY, so `let r2 = r; r = &b; consume(a); *r2` dropped the borrow
`r2` still aliased and accepted a use-after-move. Now ref-counted by b_id
(mirroring the (c) block and expire_dead_ref_bindings), so an aliased loan
survives the reassign. The `&mut` variant (exclusive aliasing) is caught too.
- Reassigned-local summary: the summary walker did not update a reassigned
ref-local's origins, so `let mut t = pick(y); t = pick(x); return t`
summarised the stale {y}. It now UNIONs origins on reassignment
(conservative, flow-insensitive), summarising {x,y}.
Two low-severity residuals are documented in-code (Polonius #553 closes them):
a summary that cannot bootstrap an origin for a base-case-less divergent
recursion (unreachable — the function never returns), and a loop-body reassign
to an outer borrow (&-symmetric, predates #554).
Full suite 397/397 green; +2 regression fixtures (alias-survives-reassign,
reassigned-local-summary).
Refs #554.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments