-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Insert int3 after non-returning calls at the end of basic blocks. #17535
Conversation
This is a follow-up to dotnet#17501 that fixed #17398. gc pointer reporting in fully-interruptible mode: the latter assumed that register gc pointer liveness doesn't change across calls while dotnet#6103 introduced codegen where it wasn't true. doesn't change across calls. This change inserts int3 after non-returning calls at the end of basic blocks so that gc pointer liveness doesn't change across calls. This is additional insurance in case any other place in the runtime is dependent on that contract.
jit-diff --frameworks:
|
@dotnet/jit-contrib |
The change was suggested by @AndyAyersMS in #17398. |
@dotnet-bot test Windows_NT x86 Checked gcstress0xc_zapdisable_jitstress2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FWIW I think this bug has been around much longer. The existing int3 padding has compensated for it in many cases, though I'd wager with the right set of IBC data we could have found cases where that padding wouldn't kick in properly and we could have seen the same sort of issue. GC stress failures look to be cases covered by #17330. |
@dotnet-bot test CentOS7.1 x64 Checked Innerloop Build and Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a follow-up to #17501 that fixed #17398.
#17398 was caused by a break in implicit contract between codegen and
gc pointer reporting in fully-interruptible mode: the latter assumed that
register gc pointer liveness doesn't change across calls while #6103 introduced
codegen where it wasn't true.
#17501 changed gc pointer reporting not to expect that register gc pointer liveness
doesn't change across calls.
This change inserts int3 after non-returning calls at the end of basic blocks
so that gc pointer liveness doesn't change across calls. This is additional
insurance in case any other place in runtime is dependent on that contract.