Skip to content

Make CrashInfoService JSON parsing AOT friendly - #6099

Merged
max-charlamb merged 1 commit into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/nativeaot-crash-info-json
Oct 20, 2026
Merged

max-charlamb merged 1 commit into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/nativeaot-crash-info-json

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Summary

Isolates the crash-info JSON change from commit 30d1a79 on current origin/main, independently of the register-sizing PR.

  • Replace reflection-based deserialization with a private source-generated JsonSerializerContext.
  • Preserve schema/property names, hexadecimal converters, quoted numeric values, trailing commas, and error logging.
  • Cover runtime metadata, nested exceptions/stack frames, numeric values, malformed payloads, and overflowing hexadecimal values.
  • Make test fixtures self-contained instead of bringing in the original branch's unrelated caching/COM work.

Validation

  • All 12 JSON regression cases pass with reflection serialization disabled.
  • Isolated net8.0/win-x64 NativeAOT publish completes with zero AOT/trimming warnings, without suppressions or broad metadata roots.
  • Actual NativeAOT execution reports JSON reflection disabled and successfully validates the full nested payload and invalid-input handling.
  • Optional ClrMA debugger integration cases could not run locally: their configuration enumeration supplied no DbgEng dump test data.

The zero-warning audit covers crash-info JSON, not the full SOS dependency closure. No framework retargeting, register-sizing, generated COM, command-factory, caching, or packaging changes are included.

Use a private source-generated JsonSerializerContext instead of reflection-based deserialization. Preserve the schema, hexadecimal converters, numeric strings, trailing commas, and existing error reporting.

Isolate commit 30d1a79 on origin/main with standalone JSON fixtures, excluding unrelated caching and COM changes. Twelve JSON regression cases pass with reflection disabled; isolated NativeAOT publish has zero AOT/trimming warnings and executes the full nested payload successfully.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: ab215431-2cf9-4421-8822-d411adca0f92
@max-charlamb max-charlamb changed the title Fix crash-info JSON trimming and AOT issues Make CrashInfoService JSON parsing AOT friendly Oct 9, 2026
@max-charlamb
max-charlamb marked this pull request as ready for review October 9, 2026 02:32
@max-charlamb
max-charlamb requested a review from a team as a code owner October 9, 2026 02:32
@max-charlamb
max-charlamb merged commit 184e0f3 into dotnet:main Oct 20, 2026
25 checks passed
@max-charlamb
max-charlamb deleted the dev/max-charlamb/nativeaot-crash-info-json branch October 20, 2026 12:46
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants