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

[mono][aot] Add support for deferred failures during AOT compilation #86554

Merged
merged 8 commits into from
May 31, 2023

Conversation

kotlarmilos
Copy link
Member

This PR aims to introduce support for handling deferred failures that may occur during AOT compilation. When the AOT compiler encounters a failure during a class initialization that is not severe enough to require aborting the AOT compilation process, it will print a warning and proceed with the class layout setup and initialization. During runtime, if a class has a deferred failure, it will skip cached data and instead opt for the slower process of setting up the class layout at runtime, which allow exception handling during the execution.

In the AOT compilation phase, the function set_failure_type(DEFERRED_FAILURE) is called to set a failure callback that defers a failure for runtime execution. During JIT and AOT runtime, the function set_failure_type(IMMEDIATE_FAILURE) is called to set a failure callback which handles failures during the execution.

Fixes #86327

@kotlarmilos kotlarmilos added this to the 8.0.0 milestone May 21, 2023
@kotlarmilos kotlarmilos self-assigned this May 21, 2023
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos kotlarmilos marked this pull request as ready for review May 24, 2023 10:36
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

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

lgtm

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

The failures are known and shouldn't be related.

@kotlarmilos kotlarmilos merged commit 1f96376 into dotnet:main May 31, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 30, 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.

[mono][aot] Loader tests failing on CI with Mono LLVM FullAOT
3 participants