[mono][aot] Add support for deferred failures during AOT compilation#86554
Merged
kotlarmilos merged 8 commits intodotnet:mainfrom May 31, 2023
Merged
Conversation
Member
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced May 21, 2023
Member
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lambdageek
reviewed
May 24, 2023
…d_failure_callback
Member
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
approved these changes
May 31, 2023
Member
Author
|
The failures are known and shouldn't be related. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 functionset_failure_type(IMMEDIATE_FAILURE)is called to set a failure callback which handles failures during the execution.Fixes #86327