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 tailcall-to-loop improper locals zeroing #81083

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jan 24, 2023

The zeroing that the tailcall-to-loop optimization does was zeroing the
promoted copies for implicit byrefs even when promotion of them was undone.
This was introducing unexpected references to the promoted fields.

Fix #81081

The zeroing that the tailcall-to-loop optimization does was zeroing the
promoted copies implicit byrefs even when promotion of them was undone.
This was introducing unexpected references to the promoted fields.

Fix dotnet#81081
@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 Jan 24, 2023
@ghost ghost assigned jakobbotsch Jan 24, 2023
@ghost
Copy link

ghost commented Jan 24, 2023

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

Issue Details

The zeroing that the tailcall-to-loop optimization does was zeroing the
promoted copies implicit byrefs even when promotion of them was undone.
This was introducing unexpected references to the promoted fields.

Fix #81081

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Jan 24, 2023

The arm32 tpdiff was caused by this error:

[16:21:44] ERROR: Method 423038 of size 7557059 failed to load and compile correctly by JIT2 (C:\h\w\A764090A\p\diff\release\clrjit_universal_arm_x86.dll).

[16:21:44] ERROR: main method 423038 of size 7557059 failed to load and compile correctly.

[16:21:44] ERROR: Exception thrown: SuperPMI assertion 'index != -1' failed ("Didn't find Item (in Get)")

[16:21:44] failed (missing key "key" in map GetObjectType): key FFFFFFFFEE627D78

I cannot reproduce it locally, this was probably some OOM error (the exception code looks like a C++ exception and the size looks very large).
There is a separate issue which is that SPMI does not look to properly handle discarding the diffs when the base JIT succeeds and then the diff JIT fails, I will add it on my todo list to fix.

The test failure looks like #76905.

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

@jakobbotsch jakobbotsch merged commit 9b76c28 into dotnet:main Jan 25, 2023
@jakobbotsch jakobbotsch deleted the fix-81081 branch January 25, 2023 08:05
@ghost ghost locked as resolved and limited conversation to collaborators Feb 24, 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.

JIT: Improper handling of GC structs with undone promotion in tailcall-to-loop optimization
2 participants