Repository navigation
Do not emit try table on native AOT - #135761
Merged
MichalStrehovsky merged 3 commits intoOct 15, 2026
Merged
Conversation
Not sure if the EH scheme is supposed to work with native AOT. LLVM-WASM does things differently. For now, do not generate any try tables on native AOT, EH doesn't work anyway. Avoids relocs to WASM_CLR_RESTORE_CONTEXT_EXCEPTION_TAG_LEB. Co-authored-by: Copilot <[email protected]> Copilot-Session: c78266f3-08e3-4918-b2e5-9fe0ddf2ca17
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
jkotas
reviewed
Oct 14, 2026
This was referenced Oct 14, 2026
Closed
Updated TODO comment for clarity regarding NativeAOT.
jkotas
approved these changes
Oct 14, 2026
jkotas
approved these changes
Oct 14, 2026
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.
Part of a series of pull requests that enable compiling, linking, and running a
Console.WriteLinehello world on WASI/native AOT.Summary
Emit an ordinary Wasm
blockfor NativeAOT try intervals instead of CoreCLR'stry_table/catch-resumption scheme. This avoids emittingWASM_CLR_RESTORE_CONTEXT_EXCEPTION_TAG_LEB, which the NativeAOT object-writing path does not support.Interval nesting, funclet emission, scanner dependencies, and normal-path finally execution are retained. CoreCLR keeps its existing behavior.
This is a bringup workaround, not an exception-handling implementation. Managed catch/filter execution and exception resumption remain unsupported.
Validation
.\src\coreclr\build-runtime.cmd -checked -x64 -component wasmjit- passed.compile-hello.ps1 -NoDebug, including the-Variant CoreLibcontrol).Hello world from WASI CoreLib!and exited 0 under Wasmtime.These results are from the combined local bringup tree, including prerequisite NativeAOT/Wasm enablement, not a fresh build of this isolated main-based branch. The probe scripts are local fixtures, not tests added by this PR.
Note
This PR description was generated by GitHub Copilot.