Skip to content
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

JIT: Fix ACD updates when a non-enclosing EH region is removed #110374

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

AndyAyersMS
Copy link
Member

When an EH region is removed, the JIT must make suitable updates to any existing AddCodeDescs (ACDs). We were missing logic for the case where the removed region was not the enclosing region of the ACD.

Fixes #110346.

When an EH region is removed, the JIT must make suitable updates to
any existing AddCodeDescs (ACDs). We were missing logic for the case
where the removed region was not the enclosing region of the ACD.

Fixes dotnet#110346.

We still need to adjust the try/handler index
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Dec 3, 2024
@AndyAyersMS
Copy link
Member Author

@amanasifkhalid can you PTAL
cc @dotnet/jit-contrib

A few more details here: #110346 (comment)

Copy link
Member

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

I'm not super familiar with AddCodeDsc, but looks like this is just fixing a logic bug where we always need to update the try/handler region indices, regardless of what acdKeyDsg is.

LGTM, thanks!

@MichalStrehovsky
Copy link
Member

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS AndyAyersMS merged commit f2e5072 into dotnet:main Dec 4, 2024
125 of 130 checks passed
eduardo-vp pushed a commit to eduardo-vp/runtime that referenced this pull request Dec 5, 2024
…t#110374)

When an EH region is removed, the JIT must make suitable updates to
any existing AddCodeDescs (ACDs). We were missing logic for the case
where the removed region was not the enclosing region of the ACD.

Fixes dotnet#110346.
mikelle-rogers pushed a commit to mikelle-rogers/runtime that referenced this pull request Dec 10, 2024
…t#110374)

When an EH region is removed, the JIT must make suitable updates to
any existing AddCodeDescs (ACDs). We were missing logic for the case
where the removed region was not the enclosing region of the ACD.

Fixes dotnet#110346.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failed '!inTry || ((unsigned)(add->acdTryIndex - 1) != XTnum)' during 'Remove empty finally 2'
3 participants