Skip to content
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

[release/8.0] Fix LDTOKEN of methods that have modifiers #91439

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 1, 2023

Backport of #91382 to release/8.0

/cc @MichalStrehovsky

Customer Impact

This was a customer reported regression from 7.0 reported at #91065. LINQ expression trees referencing methods that have custom modifiers in the signature would not work.

Testing

All of our NativeAOT testing. Verified the customer app is fixed with this.

Risk

Low, this is a low risk fix specifically for 8.0 (ignore custom modifiers to restore 7.0 behavior).

We'll need a more comprehensive fix to be able to distinguish corner cases (that were already broken in 7.0 but people are very unlikely to hit because they'd need a class with two methods where the signature of the methods only differ in modifiers - AFAIK this is only reachable with C# if one has two methods that take function pointers as parameters and they differ only in calling conventions).

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

When we started generating custom modifiers into metadata format to support new function pointer APIs in #85504, we should have also added it to native layout format. We currently have a mismatch. This is a low risk bugfix to ignore modifiers on the metadata side. We'll want to do a full fix to actually emit and compare this. Tracked in a .NET 9 bug at #91381.

No regression test because I spent too much time being puzzled at why https://github.com/Handlebars-Net/Handlebars.Net/blob/50614fd844e5360eb10e76154aa74da4d7bf12ce/source/Handlebars/Helpers/IHelperDescriptor.cs#L13 is generated as a custom modifier (`[in] !TOptions& modreq([netstandard]System.Runtime.InteropServices.InAttribute) options`) whereas if I do it, I get `[in] !T& 'value'` with a custom attribute. We'll want to write a proper set of tests with ambiguities for the bug I opened anyway.
@ghost
Copy link

ghost commented Sep 1, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #91382 to release/8.0

/cc @MichalStrehovsky

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. once ready this can be merged

@jeffschwMSFT jeffschwMSFT added the Servicing-approved Approved for servicing release label Sep 1, 2023
@jeffschwMSFT jeffschwMSFT added this to the 8.0.0 milestone Sep 1, 2023
@carlossanlop
Copy link
Member

Failure is #90434

@carlossanlop carlossanlop merged commit 62b57fc into release/8.0 Sep 1, 2023
103 of 108 checks passed
@carlossanlop carlossanlop deleted the backport/pr-91382-to-release/8.0 branch September 1, 2023 18:39
@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants