Skip to content

[clr-interp] Fix emit of bb end var moves - #114267

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-stack-state
Apr 5, 2025
Merged

[clr-interp] Fix emit of bb end var moves#114267
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-stack-state

Conversation

@BrzVlad

@BrzVlad BrzVlad commented Apr 4, 2025

Copy link
Copy Markdown
Member

This code makes the current stack state match the stack state expected by a bblock that we transition to. The code was accidentally offseting from the current stack pointer, rather than from the base of the stack.

Issue observed by @janvorli in some of the code bring up tests with code involving the ternary conditional operator.

This code makes the current stack state match the stack state expected by a bblock that we transition to. The code was accidentally offseting from the current stack pointer, rather than from the base of the stack.
Copilot AI review requested due to automatic review settings April 4, 2025 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/coreclr/interpreter/compiler.cpp:405

  • The use of m_pStackBase instead of m_pStackPointer appears to correctly fix the offset issue. Please ensure that m_pStackBase is always correctly sized and mirrors the expected layout of the stack to avoid any potential runtime issues.
int sVar = m_pStackBase[i].var;

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