Skip to content

Fix FrameDataAllocator popping in InterpreterFrame::ExceptionUnwind#122164

Merged
janvorli merged 1 commit intodotnet:mainfrom
janvorli:fix-framedataallocator-popping
Dec 4, 2025
Merged

Fix FrameDataAllocator popping in InterpreterFrame::ExceptionUnwind#122164
janvorli merged 1 commit intodotnet:mainfrom
janvorli:fix-framedataallocator-popping

Conversation

@janvorli
Copy link
Copy Markdown
Member

@janvorli janvorli commented Dec 3, 2025

The InterpreterFrame::ExceptionUnwind_Impl was passing a wrong topmost frame to the frameDataAllocator.PopInfo - the one read directly from the m_pTopInterpMethodContextFrame which is not always up to date. The correct way is to use the call to GetTopInterpMethodContextFrame to get it.

It was leading to the following assert in some libraries tests: assert(pCurrent == pFirst && pCurrent->pFramePos == pCurrent->pFrameStart)

The InterpreterFrame::ExceptionUnwind_Impl was passing a wrong topmost
frame to the frameDataAllocator.PopInfo - the one read directly from
the m_pTopInterpMethodContextFrame which is not always up to date.
The correct way is to use the call to GetTopInterpMethodContextFrame
to get it.

It was leading to the following assert in some libraries tests:
assert(pCurrent == pFirst && pCurrent->pFramePos == pCurrent->pFrameStart)
@janvorli janvorli added this to the 11.0.0 milestone Dec 3, 2025
@janvorli janvorli self-assigned this Dec 3, 2025
Copilot AI review requested due to automatic review settings December 3, 2025 23:48
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in InterpreterFrame::ExceptionUnwind_Impl where it was using a stale cached frame pointer instead of getting the current topmost interpreter frame, leading to assertion failures in the frame data allocator.

Key Change:

  • Changed from directly accessing m_pTopInterpMethodContextFrame to calling GetTopInterpMethodContextFrame() to obtain the actual current topmost frame

@janvorli
Copy link
Copy Markdown
Member Author

janvorli commented Dec 4, 2025

/ba-g the failure is #35066 and it is unrelated to this PR

@janvorli janvorli merged commit 7c2df42 into dotnet:main Dec 4, 2025
103 of 107 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 4, 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.

3 participants