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

Fix LDTOKEN of methods that have modifiers #91382

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

MichalStrehovsky
Copy link
Member

Fixes #91065.

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 that we can take to 8.0. 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.

Cc @dotnet/ilc-contrib

When we started generating custom modifiers into metadata format to support new function pointer APIs in dotnet#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 dotnet#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 Aug 31, 2023

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

Issue Details

Fixes #91065.

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 that we can take to 8.0. 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.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-NativeAOT-coreclr

Milestone: -

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@MichalStrehovsky MichalStrehovsky merged commit 43f3e60 into dotnet:main Sep 1, 2023
99 of 108 checks passed
@MichalStrehovsky MichalStrehovsky deleted the fix91065 branch September 1, 2023 00:07
@MichalStrehovsky
Copy link
Member Author

/backport to release/8.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2023

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6043704496

@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

native aot regression in .net 8.0
2 participants