Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Apr 4, 2025

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 Copilot AI review requested due to automatic review settings April 4, 2025 16:17
Copy link
Contributor

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

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;

@BrzVlad BrzVlad merged commit 0c01286 into dotnet:main Apr 5, 2025
96 of 98 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2025
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