Skip to content

Fix in-proc crash reporter frame assert. - #131273

Merged
lateralusX merged 1 commit into
dotnet:mainfrom
lateralusX:lateralusX/fix-in-proc-crash-reporter-frame-assert
Jul 24, 2026
Merged

lateralusX merged 1 commit into
dotnet:mainfrom
lateralusX:lateralusX/fix-in-proc-crash-reporter-frame-assert

Conversation

@lateralusX

Copy link
Copy Markdown
Member

Stackwalk callback in in-proc crash reporter didn't check if a CrawlFrame was FrameLess before calling its GetRelOffset, something that method asserts, triggering an abort in debug builds.

@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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@lateralusX
lateralusX merged commit b73b8fa into dotnet:main Jul 24, 2026
109 of 112 checks passed
hez2010 pushed a commit to hez2010/runtime that referenced this pull request Jul 26, 2026
Stackwalk callback in in-proc crash reporter didn't check if a
CrawlFrame was FrameLess before calling its GetRelOffset, something that
method asserts, triggering an abort in debug builds.
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Jul 26, 2026
mdh1418 added a commit that referenced this pull request Jul 29, 2026
…1481)

FIxes #131517

#131273 avoided calling CrawlFrame::GetRelOffset() for framed
crash-report stack frames. However, the reporter still attempted to
resolve an IL offset for those frames.

A native SIGSEGV during a managed P/Invoke transition produced a framed
CrawlFrame where:

• the MethodDesc represented the managed P/Invoke method;
• the instruction pointer was inside the native function that faulted.

Passing that pair to GetILOffsetFromNative triggered this Checked-build
assertion:

`g_pEEInterface->GetNativeCodeMethodDesc(startAddr) == fd`

This change only resolves native and IL offsets for frameless frames,
where the stack walker has valid managed  EECodeInfo . This includes
faulted frameless frames. Framed transition frames still retain their
method, module, and token information, but report native and IL offsets
of zero.

Testing

Validated real macOS arm64 in-proc crash reports in both Checked and
Release builds, including a native SIGSEGV triggered through P/Invoke.

---------

Copilot-Session: 4e8cbca3-06b0-4e48-9159-71608830cb0d
Copilot-Session: 13d168eb-c2c9-410e-b5fb-be2637ac4e9a
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants