Skip to content

Conversation

@jakobbotsch
Copy link
Member

emitSplit did not handle the edge case where the last instruction group of the function/funclet resulted in the size to overflow the max. Use a lambda so we can call the necessary code both as part of the loop and after the loop.

Fix #85063

emitSplit did not handle the edge case where the last instruction group
of the function/funclet resulted in the size to overflow the max. Use a
lambda so we can call the necessary code both as part of the loop and
after the loop.

Fix dotnet#85063
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Aug 9, 2023
@ghost ghost assigned jakobbotsch Aug 9, 2023
@ghost
Copy link

ghost commented Aug 9, 2023

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

Issue Details

emitSplit did not handle the edge case where the last instruction group of the function/funclet resulted in the size to overflow the max. Use a lambda so we can call the necessary code both as part of the loop and after the loop.

Fix #85063

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

Diff of related JitDump in the Antigen example in #85063 (back on 2032a59, as it does not repro on main):

@@ -175,6 +175,9 @@ reserveUnwindInfo(isFunclet=true, isColdCode=false, unwindSize=0x10)
 reserveUnwindInfo(isFunclet=true, isColdCode=false, unwindSize=0x10)
 Split unwind info into 2 fragments (function/funclet size: 2096588, maximum fragment size: 1048576)
 emitSplit: split at IG16039 is size ffdc4, less than requested maximum size of 100000
+emitSplit: split at IG20065 is size ffff0, less than requested maximum size of 100000
 reserveUnwindInfo(isFunclet=true, isColdCode=false, unwindSize=0xc)
 reserveUnwindInfo: fragment #2:
+reserveUnwindInfo(isFunclet=true, isColdCode=false, unwindSize=0x10)
+reserveUnwindInfo: fragment #3:
 reserveUnwindInfo(isFunclet=true, isColdCode=false, unwindSize=0x14)

@jakobbotsch jakobbotsch marked this pull request as ready for review August 9, 2023 19:23
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @BruceForstall

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM

@jakobbotsch jakobbotsch merged commit 405a62f into dotnet:main Aug 9, 2023
@jakobbotsch jakobbotsch deleted the fix-85063 branch August 9, 2023 22:39
@ghost ghost locked as resolved and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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 'headerFunctionLength <= 0x3FFFFU' during 'Emit GC+EH tables' (IL size 712083; hash 0x46e9aa75; Tier0-MinOpts)

2 participants