Repository navigation
Do not use CORINFO_HELP_INITCLASS on native AOT - #135760
Merged
MichalStrehovsky merged 1 commit intoOct 14, 2026
Merged
Conversation
We cannot implement this helper, it's considered reflection. We have no problem emitting the R2R helpers needed. Co-authored-by: Copilot <[email protected]> Copilot-Session: c78266f3-08e3-4918-b2e5-9fe0ddf2ca17
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 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
approved these changes
Oct 14, 2026
This was referenced Oct 14, 2026
Closed
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
Limit Wasm's
CORINFO_HELP_INITCLASSearly return infgGetSharedCCtorto CoreCLR. NativeAOT can then use its existing ReadyToRun class-constructor/static-base helper selection instead of requesting a helper ILC cannot implement.The observed failure was
System.NotImplementedException: CORINFO_HELP_INITCLASSwhile compilingSystem.AppContext.OnUnhandledException(object). The corrected JIT dump selectsCORINFO_HELP_READYTORUN_NONGCSTATIC_BASE. CoreCLR Wasm still avoids dynamically created helpers.Validation
.\src\coreclr\build-runtime.cmd -checked -x64 -component wasmjit- passed.-NoDebug; with the rest of the series, both linked and ran successfully 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.