Skip to content

[interp] Fix boundary condition where a leave is not added to the leaves table#120228

Merged
kg merged 2 commits intodotnet:mainfrom
kg:interp-leaves-table-offbyone
Oct 1, 2025
Merged

[interp] Fix boundary condition where a leave is not added to the leaves table#120228
kg merged 2 commits intodotnet:mainfrom
kg:interp-leaves-table-offbyone

Conversation

@kg
Copy link
Member

@kg kg commented Sep 29, 2025

Fixes Interop\PInvoke\CriticalHandles\Test\Test

… if the leave target is the exact end of the try block
@kg kg requested a review from BrzVlad as a code owner September 29, 2025 21:28
@kg kg requested a review from janvorli as a code owner September 29, 2025 21:28
Copilot AI review requested due to automatic review settings September 29, 2025 21:28
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

Fixes a boundary condition bug in the CoreCLR interpreter where a leave instruction is not properly added to the leaves table when the leave target is at the exact end of a try region.

  • Changes the boundary check from <= to < to exclude the exact end position of try regions
  • Ensures proper finally call island block creation for leave instructions at try region boundaries

@dotnet-policy-service
Copy link
Contributor

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

@kg
Copy link
Member Author

kg commented Sep 29, 2025

Jan noticed another wrong comparison that I will fix once the test passes locally.

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!

@kg kg merged commit a11d794 into dotnet:main Oct 1, 2025
96 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 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.

3 participants