Skip to content

Conversation

@davidwrighton
Copy link
Member

  • These vars were not be accounted for in m_varsSize, which caused overlaps in the assigned vars
  • I also noticed that we were allocating these as global vars, and they don't need to be, so I've tweaked that as well

This was causing generalized memory corruption around several tests with EH.

- These vars were not be accounted for in m_varsSize, which caused overlaps in the assigned vars
- I also noticed that we were allocating these as global vars, and they don't need to be, so I've tweaked that as well

This was causing generalized memory corruption around several tests with EH.
Copilot AI review requested due to automatic review settings September 23, 2025 22:21
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 23, 2025
@davidwrighton davidwrighton enabled auto-merge (squash) September 23, 2025 22:22
Copy link
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 critical memory corruption issue in the CoreCLR interpreter's exception handling (EH) clause variable construction. The fix addresses two problems: EH clause variables weren't being counted in m_varsSize causing memory overlaps, and these variables were incorrectly allocated as global variables when they should be local.

Key Changes

  • Added proper accounting for EH clause variables in m_varsSize to prevent memory overlaps
  • Changed EH clause variable allocation from global to local scope
  • Added safety check to skip unallocated variables during GC info building

Copy link
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

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

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@davidwrighton davidwrighton merged commit fc1dee6 into dotnet:main Sep 24, 2025
96 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants