Skip to content

[wasm][coreclr] Fail on composite prebuilt R2R images instead of silently publishing IL - #135479

Draft
lewing wants to merge 1 commit into
dotnet:mainfrom
lewing:lewing-wasm-cdac-stack-audit
Draft

lewing wants to merge 1 commit into
dotnet:mainfrom
lewing:lewing-wasm-cdac-stack-audit

Conversation

@lewing

@lewing lewing commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

A CoreCLR browser-wasm R2R publish using the base SDK ReadyToRun tasks (without Crossgen2SdkOverride*) succeeds but ships IL only. Those tasks run crossgen2 with --composite per assembly and name the output <name>.dll (dotnet/sdk#55785), producing a composite owner image whose MVID is empty. The MVID guard from #133378 correctly rejects it, but falls back to IL silently.

An empty prebuilt MVID is now a build error that points at the override properties. A non-empty MVID mismatch (a stale image) still falls back to IL. All parseable R2R images in the runtime pack have non-empty MVIDs. ConvertDllsToWebcil_Fails_WhenPrebuiltR2RIsComposite covers the new error.

Note

This PR description and change were generated with GitHub Copilot.

…ishing IL

With the base SDK ReadyToRun tasks, a non-composite CoreCLR browser-wasm publish
runs crossgen2 in composite mode per assembly and names the output <name>.dll.
That image is a composite owner whose metadata MVID is empty, so
ConvertDllsToWebcil's MVID guard rejected it and silently converted IL instead:
the publish succeeded with no ReadyToRun code.

Treat an empty prebuilt MVID as an error pointing at the Crossgen2SdkOverride
properties (dotnet/sdk#55785), and return !Log.HasLoggedErrors from Execute.
Genuine non-empty MVID mismatches still fall back to IL.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6eba4d35-1574-4503-8c7f-7ee485aafa4e
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant