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

Only report live ranges for allocated variables #57843

Merged
merged 1 commit into from Aug 30, 2021

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Aug 20, 2021

With dead code it is possible that certain IL locals are never
allocated, but still live in other blocks. In this case there is no
information to report to the VM.

Fixes #57767

In the previous behavior we would report back BAD_STK_OFFS to the VM for these IL variables.
I'm not totally sure what effect that has on the VM/debugger. But given that this data makes it pretty far into the runtime, and the fact that we have quite a bit of this kind of dead code that makes it to codegen #57767 (comment)), this targeted fix might be one to backport. Any thoughts?

cc @dotnet/jit-contrib

With dead code it is possible that certain IL locals are never
allocated, but still live in other blocks. In this case there is no
information to report to the VM.

Fixes dotnet#57767
@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 Aug 20, 2021
@ghost
Copy link

ghost commented Aug 20, 2021

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

Issue Details

With dead code it is possible that certain IL locals are never
allocated, but still live in other blocks. In this case there is no
information to report to the VM.

Fixes #57767

In the previous behavior we would report back BAD_STK_OFFS to the VM for these IL variables.
I'm not totally sure what effect that has on the VM/debugger. But given that this data makes
it pretty far into the runtime, and the fact that we have quite a bit of this kind of dead code that makes
it to codegen (#57767 (comment)), this
targeted fix might be one to backport. Any thoughts?

cc @dotnet/jit-contrib

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

I checked the runtime and it does not look like this corrupted data has any ill effects in non-debugger parts. I then tried debugging the optimized code with this problem and found no issues, potentially because the IP is never within the buggy region, so this seems very difficult to hit. Don't think this needs to be backported.

@jakobbotsch
Copy link
Member Author

ping @EgorBo @dotnet/jit-contrib

@jakobbotsch jakobbotsch merged commit b11ba76 into dotnet:main Aug 30, 2021
@jakobbotsch jakobbotsch deleted the fix-57767 branch August 30, 2021 11:00
@dotnet dotnet locked as resolved and limited conversation to collaborators Sep 29, 2021
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.

JIT: Assertion failed 'offset != BAD_STK_OFFS'
3 participants