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
VM: (bug) Delegate.Method on an open delegate to an inherited private generic-base method pollutes the derived type's reflection cache #134219
Reading Delegate.Method on an open-instance delegate to a private method of a generic base class exposes that private method through the derived type's reflection cache. Checked CoreCLR terminates on an assertion in the member cache merge; Release silently pollutes the cache so typeof(Derived).GetMethods(...) starts returning the base class's private method.
CoreCLR main (Checked) terminates on an assertion:
MemberwiseClone,Finalize
Process terminated.
Assertion failed.
false
at System.RuntimeType.RuntimeTypeCache.MemberInfoCache`1.MergeWithGlobalList(T[] list)
at System.RuntimeType.GetMethodBase(RuntimeType reflectedType, RuntimeMethodHandleInternal methodHandle)
at System.Delegate.GetMethodImplUncached()
Release silently pollutes the derived type's cache:
The open-delegate branch in Delegate.GetMethodImplUncached (src/coreclr/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs) substitutes Derived as the reflected type instead of normalizing back to the exact generic base type that declares the private method. A private method is not a member of the derived type, so it must not be entered into that type's member cache.
Regression?
No. Reproduces on .NET 10.0.12 (Release) and on current main.
Platform
Windows x64, CoreCLR main (Checked) and .NET 10.0.12 (Release).
Activity
dotnet-policy-service commentedon Sep 18, 2026
Tagging subscribers to this area: @steveisok, @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Sep 18, 2026
Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Sep 18, 2026
Tagging subscribers to this area: @steveisok, @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Sep 18, 2026
Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.
Fix Delegate.Method reflection cache pollution for private generic-ba…