Skip to content

JIT: Fix tailcall-to-loop improper locals zeroing - #81083

Merged
jakobbotsch merged 4 commits into
dotnet:mainfrom
jakobbotsch:fix-81081
Jan 25, 2023
Merged

JIT: Fix tailcall-to-loop improper locals zeroing#81083
jakobbotsch merged 4 commits into
dotnet:mainfrom
jakobbotsch:fix-81081

Conversation

@jakobbotsch

@jakobbotschjakobbotsch commented Jan 24, 2023

Copy link
Copy Markdown
Member

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.
Fixdotnet#81081
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 24, 2023
@ghost

Copy link
Copy Markdown

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

jakobbotsch commented Jan 24, 2023

Copy link
Copy Markdown
MemberAuthor

The arm32 tpdiff was caused by this error:

[16:21:44] ERROR:Method423038 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:Exceptionthrown: 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
Copy Markdown
MemberAuthor

cc @dotnet/jit-contrib PTAL @AndyAyersMS

@jakobbotsch
jakobbotsch merged commit 9b76c28 into dotnet:mainJan 25, 2023
@jakobbotsch
jakobbotsch deleted the fix-81081 branch January 25, 2023 08:05
@ghostghost locked as resolved and limited conversation to collaborators Feb 24, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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

@jakobbotsch@AndyAyersMS