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/9.0-staging] [mono][mini] Disable inlining if we encounter class initialization failure #112005

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 30, 2025

Backport of #111754 to release/9.0-staging

This adds on top of #110271, which proved insufficient during validation of customer app for February NET9 service release.

Customer Impact

AOT of some assemblies can lead to compilation crashes, on iOS for example. This would force users to use interpreter instead.

Regression

Regression introduced in .NET9.

Testing

Tested with sample application provided by customer.

Risk

Low. In rare cases, when typeload exception was detected during compile time, we were emitting code to throw this exception at runtime (this was behavior introduced in net9). This functionality didn't work correctly when the code was emitted as part of an inlined method. This fix takes a conservative approach by disabling inlining for these methods (which we shouldn't really do even if the codegen were correct), reusing existing functionality.

…ilure

method_make_alwaysthrow_typeloadfailure replaces the entire method code with a throw of type load exception. This behaviour not only seem dubious, if it is triggered from inlining a method, that might never even get called, but it also does changes to the set of basic blocks that can lead to crashes later on during compilation.
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-JIT-mono Servicing-consider Issue for next servicing release review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant