Skip to content

[clrinterp] Remove wrong assertion#128548

Merged
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-assertion
May 25, 2026
Merged

[clrinterp] Remove wrong assertion#128548
BrzVlad merged 1 commit into
dotnet:mainfrom
BrzVlad:fix-clrinterp-assertion

Conversation

@BrzVlad

@BrzVlad BrzVlad commented May 25, 2026

Copy link
Copy Markdown
Member

The return value of a call is normally a local var, but it can later be promoted to a global var if it is left on the IL stack and then later used in a different basic block. We don't need any special handling if the return value of an async call is a global var.

Assertion incorrectly added in #128403

The return value of a call is normally a local var, but it can later be promoted to a global var if it is left on the IL stack and then later used in a different basic block. We don't need any special handling if the return value of an async call is a global var.
@BrzVlad

BrzVlad commented May 25, 2026

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries-interpreter

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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.

Pull request overview

This PR adjusts the async suspend-data fixup logic in the CoreCLR interpreter compiler to allow the async call return value “var” to be a global (dedicated-offset) variable, removing an assertion that incorrectly assumed it could never be global.

Changes:

  • Removes the assert(!m_pVars[varIndex].global) in InterpCompiler::UpdateLocalIntervalMaps().
  • Narrows the “unused async return value” invalidation case to only apply when the return value var is not global and has liveStart == liveEnd.

@BrzVlad

BrzVlad commented May 25, 2026

Copy link
Copy Markdown
Member Author

/ba-g failures unrelated

@BrzVlad BrzVlad merged commit ad815e7 into dotnet:main May 25, 2026
114 of 124 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants