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 3359edf
Browse filesBrowse the repository at this point in the historyBrowse files
extractor: self-owned-property is a collectable subscription source
A subscription whose event SOURCE is reached through a get-only property the class
owns — this.Child.Event += this-capturing-handler, where Child is a property over a
constructed field — is the same collectable self-cycle as subscribing on the owned
field directly, not a leak. The self-owned exemption already covered this/fields/
locals the class constructs but not the PROPERTY receiver, so protobuf-net's
CommandLineOptions (XsltOptions, a get-only property over a constructed
XsltArgumentList, with a this-capturing handler) was falsely warned as an injected
subscription leak.
PropertyReturnsOwnedMember recognises a get-only property whose value the class
owns: an auto-property '{ get; } = new T()', or a getter returning a constructed
member (=> _owned / get => _owned / get { return _owned; }). Get-only is required —
a settable property could be reassigned to an injected, longer-lived object, which
we cannot prove bounded, so it falls through to the honest 'injected' warning
(precision-first: never silently drop a real leak).
New corpus fixture subscription-self-owned-property: before.cs subscribes to an
injected bus (real OWN001 leak, caught), after.cs to a self-owned property (silent).
Newtonsoft's serializer.Error (serializer = Create() that escapes, handler is a
param's delegate) stays baselined: proving it non-leak needs real lifetime
modelling, so the 'may outlive' warning is honest, not a clear FP.
Re-pointing the oracle at protobuf to confirm the XsltOptions FP clears.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019846YSZ35c7CdkWQ1qX5gm
protobuf-net/protobuf-net | ProtoWriter.BufferWriter.cs | OWN001 | _nullWriter | intentional null-object kept attached for pooled reuse; Dispose() documents "don't cascade dispose to the null one"
35
35
protobuf-net/protobuf-net | ProtoTranscoder.cs | OWN001 | 'sync' | non-product (protobuf 'assorted' sample/extension tree); NetTranscoder is a long-lived singleton holding one ReaderWriterLockSlim for app lifetime
36
-
protobuf-net/protobuf-net | CommandLineOptions.cs | OWN001 | XsltMessageEncountered | non-product (assorted/ProtoGen) + self-subscription: publisher (xsltOptions) and the lambda subscriber are both owned by the same CommandLineOptions, co-lifetimed
36
+
# [fix-pending experiment] CommandLineOptions XsltMessageEncountered is cleared by the
37
+
# PropertyReturnsOwnedMember fix — the source `XsltOptions` is a get-only property over a
38
+
# constructed field, a self-cycle. Disabled here to confirm on a live protobuf oracle run
39
+
# that it no longer fires; if confirmed it is deleted, if it resurfaces it is restored.
40
+
# protobuf-net/protobuf-net | CommandLineOptions.cs | OWN001 | XsltMessageEncountered | non-product (assorted/ProtoGen) + self-subscription: publisher (xsltOptions) and the lambda subscriber are both owned by the same CommandLineOptions, co-lifetimed
37
41
protobuf-net/protobuf-net | Page.xaml.cs | OWN001 | local 'timer' | non-product (assorted/ Silverlight sample); the timer is disposed by an enclosing `using (timer) { ... }` the extractor missed
0 commit comments