Skip to content

[release/11.0] Fix ReadyToRun generic parameter symbol collisions - #137752

Open
github-actions[bot] wants to merge 2 commits into
release/11.0from
backport/pr-136191-to-release/11.0
Open

github-actions[bot] wants to merge 2 commits into
release/11.0from
backport/pr-136191-to-release/11.0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #136191 to release/11.0

/cc @jtschuster

Customer Impact

  • Customer reported
  • Found internally

Regression

  • Yes
  • No

Testing

Tests were added to ensure compilation no longer fails, and repro apps were manually validated.

Risk

Low. In ReadyToRun this representation is internal, and there are sufficient tests to be confident.

Fixes #135779

ReadyToRun runtime-determined type names used generic parameter metadata
names. Unicode generic parameter names (e.g. `List<T \u3042>` and `List<T_>`)
could therefore sanitize to the same symbol name, causing colliding
`DelayLoadHelperImport` symbols.

Special-case RuntimeDetermineType in the NameMangler and name them using the generic parameter's
signature identity instead:

- `T0`, `T1`, etc. for type parameters
- `M0`, `M1`, etc. for method parameters

This keeps an understandable diagnostic name behavior while keeping identity distinct.

Added ReadyToRun compilation tests covering Unicode and punctuation
cases in normal and composite builds.

> [!NOTE]
> This PR description was generated with GitHub Copilot.

---------

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 21c1c9a0-a662-4b3d-947e-e8217da4bd10
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/crossgen-contrib
See info in area-owners.md if you want to be subscribed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants