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
ILLink: Trimmer, NativeAOT, and Trim analyzer have inconsistent UnsafeAccessor behavior #101195
NativeAOT has basically the best behavior in these cases - it produces the same warnings
as if the accessor has a direct access to the target member. So if the accessor is correctly annotated
there will be no warnings.
Trimmer is the worst - due to the fact that we mark all methods with a given name, we can't compare
annotations and thus we need to warn on all annotated methods. In addition the accesses are modeled
as reflection accesses so the warning codes are "Reflection" codes. When/If we implement
correct target resolution, we should be able to emulate the behavior of NativeAOT
Analyzer doesn't warn at all in these cases - analyzer simply can't resolve targets (at least sometimes)
and so for now we're not doing anything with UnsafeAccessor in the analyzer.
changed the title [-]Trimmer, NativeAOT, and Trim analyzer have inconsistent UnsafeAccessor behavior[/-][+]ILLink: Trimmer, NativeAOT, and Trim analyzer have inconsistent UnsafeAccessor behavior[/+]on Jun 13, 2024
Activity
dotnet-policy-service commentedon Apr 17, 2024
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.
[-]Trimmer, NativeAOT, and Trim analyzer have inconsistent UnsafeAccessor behavior[/-][+]ILLink: Trimmer, NativeAOT, and Trim analyzer have inconsistent UnsafeAccessor behavior[/+]