Skip to content

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

Merged
kotlarmilos merged 8 commits into
dotnet:mainfrom
kotlarmilos:feature/deferred-class-failures
May 31, 2023
Merged

[mono][aot] Add support for deferred failures during AOT compilation#86554
kotlarmilos merged 8 commits into
dotnet:mainfrom
kotlarmilos:feature/deferred-class-failures

Conversation

@kotlarmilos

Copy link
Copy Markdown
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

@kotlarmiloskotlarmilos added this to the 8.0.0 milestone May 21, 2023
@kotlarmiloskotlarmilos self-assigned this May 21, 2023
@kotlarmilos

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
kotlarmilos marked this pull request as ready for review May 24, 2023 10:36
Comment threadsrc/mono/mono/metadata/class-init.c Outdated

@lambdageeklambdageek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@lambdageeklambdageek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@kotlarmilos

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos

Copy link
Copy Markdown
MemberAuthor

The failures are known and shouldn't be related.

@kotlarmilos
kotlarmilos merged commit 1f96376 into dotnet:mainMay 31, 2023
@ghostghost locked as resolved and limited conversation to collaborators Jun 30, 2023
Sign up for freeto 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

@kotlarmilos@vargaz@lambdageek