Skip to content

Stage matching PDBs for trimmed CoreCLR browser-Wasm builds - #136287

Merged
radekdoulik merged 3 commits into
dotnet:mainfrom
radekdoulik:radekdoulik-wasm-in-memory-symbols-fix
Oct 29, 2026
Merged

radekdoulik merged 3 commits into
dotnet:mainfrom
radekdoulik:radekdoulik-wasm-in-memory-symbols-fix

Conversation

@radekdoulik

@radekdoulik radekdoulik commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Trimmed CoreCLR browser-Wasm builds paired ILLink-rewritten assemblies with compiler PDBs. The mismatched source mappings caused StackTraceSymbolsFromMemory to get null instead of InMemorySymbols.cs.

  • Select project and dependency PDBs from the same linked closure as their assemblies. Do not copy symbols removed by ILLink.
  • Fix ComputeWasmPublishAssets to use the resolved publish PDB and regenerate compressed symbols instead of reusing stale build assets.
  • Cover retained/removed symbols in publish-then-build, including raw, gzip, and Brotli PDB content. Read build candidates from the binlog rather than an injected capture target.

The build-side selection change is CoreCLR-only. The publish-task fix is shared with Mono.

Validation

macOS/arm64, Release libraries, Checked CoreCLR, Chrome:

  • SDK regression: 2 passed, including a fresh run at 5e628b94b24. Both rows fail against the original SDK.
  • Full StackTrace suite, trimmed R2R with and without native relinking: 136 passed, 5 unchanged skips per run. Before the fix: 135 passed, 1 failed, 5 skipped.
  • Verified served R2R images against crossgen2 output and checked PDB identities. A fresh untrimmed SDK publish also preserved matching symbols.

Mono/AOT and Windows execution, composite R2R, and the full Wasm.Build.Tests suite were not run.

Resolves #136286

Note

Generated with GitHub Copilot.

Stage dependency symbols from the linked closure alongside their
assemblies and select the final CoreCLR project assembly's PDB.
Do not restore symbols removed by the linker; preserve Mono behavior.

Add retained/removed-symbol publish-then-build coverage and document
matching symbols and trimmed-interpreter validation.

Fix dotnet#136286

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aadf96ff-3cc2-4257-9781-b0130cb83781
@azure-pipelines

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

Remove the symbol-staging paragraph from the library testing guide
as requested in review. Keep the trimmed-interpreter instructions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aadf96ff-3cc2-4257-9781-b0130cb83781
Select symbol assets from the resolved publish files and invalidate stale compressed build symbols using the original asset identity.

Read build candidates from the existing binlog, verify raw, gzip and Brotli publish symbols plus symbol removal, and avoid duplicate DLL existence checks.

Generated with GitHub Copilot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aadf96ff-3cc2-4257-9781-b0130cb83781
@radekdoulik
radekdoulik enabled auto-merge (squash) October 29, 2026 11:35
@radekdoulik
radekdoulik merged commit d69d3c7 into dotnet:main Oct 29, 2026
51 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 30, 2026
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.

CoreCLR browser-Wasm trimmed builds stage mismatched PDBs, breaking in-memory stack traces

3 participants