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

Another attempt at fixing #99198 #111255

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

MichalStrehovsky
Copy link
Member

The problem was always // Note: We don't set the IsUnboxingStub flag on template methods (all template lookups performed at runtime are performed with this flag not set, I tried working around it in the original fix, but looks like I actually need the function pointer in #111178 (the tests are not failing but I have a local test that does).

So trying an alternative approach that just deletes the weird code. It's possible this only had to be weird due to universal shared code.

The problem was always `// Note: We don't set the IsUnboxingStub flag on template methods (all template lookups performed at runtime are performed with this flag not set`, I tried working around it in the original fix, but looks like I actually need the function pointer in dotnet#111178 (the tests are not failing but I have a local test that does).

So trying an alternative approach that just deletes the weird code. It's possible this only had to be weird due to universal shared code.
Copy link
Contributor

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

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@@ -311,11 +311,15 @@ internal void ParseNativeLayoutInfo(InstantiatedMethod method)
throw new MissingTemplateException();
}

// We might have a mismatch between unboxing/non-unboxing variants so only remember it for static methods
Copy link
Member Author

Choose a reason for hiding this comment

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

This is my previous fix that now seems to be causing me problems.

Comment on lines -757 to -758
// Note: We don't set the IsUnboxingStub flag on template methods (all template lookups performed at runtime are performed with this flag not set,
// since it can't always be conveniently computed for a concrete method before looking up its template)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the ancient .NET Native root of all evil.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

@davidwrighton could you have a look at this? This undoes the if check I added in #99443 (that you reviewed) and instead makes native layout just tell the truth about boxing/unboxing entrypoint. It's possible we only had to lie because of USG.

@MichalStrehovsky MichalStrehovsky marked this pull request as ready for review January 14, 2025 14:13
Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

I managed to chase down the initial commit which added this logic to the type loader in our old source control system, and its not clear why it was needed. If it doesn't fail the tests now, I can't see a reason to keep this weird logic around.

@MichalStrehovsky MichalStrehovsky merged commit d4c7d86 into dotnet:main Jan 27, 2025
107 of 111 checks passed
@MichalStrehovsky MichalStrehovsky deleted the refix99198 branch January 27, 2025 22:06
@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2025
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.

2 participants