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
Referencing type from ILLink.Descriptors doesn't preserve its static abstracts #128120
Trimming will strip the static abstracts implementation from A because it will assume nobody can get at A. However I get at it with trim unsafe code. Since this is only broken with trim unsafe code, so far so good.
However, the specific case in interop does mention the equivalent of A in ILLink.Descriptors.xml (it instructs to keep some unrelated methods on the DateMarshaler type). So if I were to add A.GetA to ILLink.Descriptors.xml, can I have a reasonable assumption that the MethodBase.GetCurrentMethod() call is now safe to suppress (it is reflection visible after all)? If so, the bug here is in ILLink, because the lines:
didn't make it so that a DateMarshaler Type can be passed to MakeGenericMethod with something that is constrained with static abstracts that are called in the program.
Activity
Add marshaler types for various structures
dotnet-policy-service commentedon May 13, 2026
Tagging subscribers to this area: @agocke, @dotnet/illink
See info in area-owners.md if you want to be subscribed.
Work around illink incorrectly trimming static virtual implementations (
Add ILLink test: descriptor-preserved type should keep static abstrac…
Mark descriptor-preserved method's declaring type as relevant to vari…
Mark descriptor-preserved members as reflection-visible (#128272)
Preserve StubHelpers array marshalers in ILLink descriptor (dotnet#12…
Preserve StubHelpers array marshalers in ILLink descriptor (dotnet#12…
Preserve StubHelpers array marshalers in ILLink descriptor (dotnet#12…
Preserve StubHelpers array marshalers in ILLink descriptor (dotnet#12…
Mark descriptor-preserved members as reflection-visible (#128272)
Mark descriptor-preserved members as reflection-visible (dotnet#128272)