Closed sbomer closed 2 years ago
I debugged it a bit and this happens when the provider is the CryptoConfigForwarder
cctor, from this suppression: https://github.com/dotnet/runtime/blob/main/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfigForwarder.cs#L7-L10
The methodreference`s Module is null at the point of the stacktrace. I believe this is because the type is unused, and SweepStep detaches it from its module.
I checked that https://github.com/dotnet/linker/compare/main...sbomer:suppressionsNRE?expand=1 fixes the issue in runtime, but it needs some testing in the linker. We should be able to come up with a testcase that reproduces the issue.
@jkurdek would you mind taking a look?
@vitek-karas @sbomer there's an ILLink exception with this update:
Originally posted by @akoeplinger in https://github.com/dotnet/runtime/issues/74238#issuecomment-1220711661