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 0473c89
Browse filesBrowse the repository at this point in the historyBrowse files
feat(wpf): field-mediated cross-method use-after-dispose — a disposed field read in a subscribed handler → OWN002
An IDisposable field disposed in a class's Dispose()/DisposeAsync() and then
DIRECTLY read (`_field.Member`) inside a live subscription-target handler (RHS of
a `+=` or arg of a `.Subscribe(...)`, not torn down by a matching `-=`, with no
`if (_disposed) return;` guard) is a use-after-dispose: an external event source
can still invoke the handler after the object is torn down. The Roslyn extractor
lowers it to a synthetic acquire/release/use flow (the trick the MemoryPool
slices use), so the existing OwnIR bridge raises OWN002 — no new diagnostic, no
second checker.
Precise by construction to stay low-FP: the release must be in the dispose
lifecycle; the handler must be a live (not unsubscribed) subscription target with
no disposed-guard; and only a DIRECT field member access counts (an indirect use
via a helper is deliberately not chased — that frontier stays an honest miss, the
sibling handler-use-after-dispose case).
New corpus case corpus/wpf/field-use-after-dispose (before → OWN002, guarded
after → silent); benchmark recall floor 19 → 20.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
0 commit comments