This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Insert int3 after non-returning calls at the end of basic blocks.#17535
Merged
erozenfeld merged 1 commit intodotnet:masterfrom Apr 13, 2018
Merged
Insert int3 after non-returning calls at the end of basic blocks.#17535erozenfeld merged 1 commit intodotnet:masterfrom
erozenfeld merged 1 commit intodotnet:masterfrom
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.
Member
Author
|
jit-diff --frameworks: |
Member
Author
|
@dotnet/jit-contrib |
Member
Author
|
The change was suggested by @AndyAyersMS in #17398. |
Member
Author
|
@dotnet-bot test Windows_NT x86 Checked gcstress0xc_zapdisable_jitstress2 |
Member
|
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. |
Member
Author
|
@dotnet-bot test CentOS7.1 x64 Checked Innerloop Build and Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.