dotnet / dotnet/linker

Harden Intrinsic Reflection API Matching

Open
#1,623 3 comments 0 reactions 1 assignee Claimed by @jtschuster View on GitHub
area-Linker: DataFlow enhancement
Dominant language
C#
Stars
392
Forks
128
Avg merge
2d 10h
Merged PRs (30d)
2

Description

When `dotnet/runtime` adds new Reflection APIs (or adds overloads to existing APIs), it is possible that the new API / overload may break the ILLinker. An example of this is #1621.

Today, we the ILLinker does a basic test for intrinsic Reflection APIs:

https://github.com/mono/linker/blob/d8cbe373195ed3fc727d12d12eb5923b188a7990/src/linker/Linker.Dataflow/ReflectionMethodBodyScanner.cs#L326-L346

As long as the method is on `System.Type` and named `GetConstructor` (or named `GetMethod` and has a string as a first parameter), the ILLinker will treat the method as "intrinsic".

We should make sure this intrinsic handling works as `dotnet/runtime` adds new APIs and overloads to `System.Type`.

cc @vitek-karas

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.