-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ILLink analyzer analysis holes around dynamic objects #94057
Comments
Tagging subscribers to this area: @cston Issue DetailsThe analyzer has basic handling of For example, this produces no analyzer warnings: static void Test(dynamic d) {
d.Member = 1;
} but ILLink produces a warning:
Discovered in #94016.
|
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsThe analyzer has basic handling of For example, this produces no analyzer warnings: static void Test(dynamic d) {
d.Member = 1;
} but ILLink produces a warning:
Discovered in #94016.
|
Fixes the assert from #94016. #94057 tracks adding full support for this in the analyzer. We had some existing tests that only covered IDynamicInvocationOperation. Those have been moved to a shared testcase (shared by ILLink/NativeAot), and some additional testcases have been added that include coverage for IDynamicMemberReference, which was causing the assert. This includes the same fix for IDynamicIndexerAccessOperation.
…94236) Moves analysis of dynamic object invocations and related operations from the attribute analyzer into the dataflow analyzer. This lowers dynamic object operations into calls to methods on `Microsoft.CSharp.RuntimeBinder.Binder`, which have `RequiresUnreferencedCode` annotations, so that the analyzer produces the same warnings as ILLink. Adds handling of previously unimplemented operations on dynamic objects. Fixes #94057
Fixes the assert from dotnet#94016. dotnet#94057 tracks adding full support for this in the analyzer. We had some existing tests that only covered IDynamicInvocationOperation. Those have been moved to a shared testcase (shared by ILLink/NativeAot), and some additional testcases have been added that include coverage for IDynamicMemberReference, which was causing the assert. This includes the same fix for IDynamicIndexerAccessOperation.
The analyzer has basic handling of
IDynamicInvocationOperation
, but notIDynamicMemberInvocation
and related operation types. This support should be added and moved from the attribute-based analyzer into the dataflow analyzer.For example, this produces no analyzer warnings:
but ILLink produces a warning:
Discovered in #94016.
The text was updated successfully, but these errors were encountered: