Skip to content

Conversation

@jakobbotsch
Copy link
Member

After #89654 SPMI replay will succeed instead of result in replay errors in expected error cases (such as BADCODE or EE exception). To support diffing such contexts, we record zero-sized assembly that the near differ uses. However, on arm64 there is some additional code that calls repCompileMethod to make some additional adjustments to the code blob, and in the "EE exception" cases we cannot replay this function, resulting in crash during asmdiff. This fixes the problem by only making the adjustments when we know there is any code.

An alternative solution could be to avoid invoking the neardiffer at all in the succeeding error cases, but this seemed like an ok pragmatic solution. However, if there are differing opinions then I would be fine with also pursuing this.

Fix #91257

After dotnet#89654 SPMI replay will succeed instead of result in replay errors
in expected error cases (such as BADCODE or EE exception). To support
diffing such contexts, we record zero-sized assembly that the near
differ uses. However, on arm64 there is some additional code that calls
repCompileMethod to make some additional adjustments to the code blob,
and in the "EE exception" cases we cannot replay this function,
resulting in crash during asmdiff. This fixes the problem by only making
the adjustments when we know there is any code.

An alternative solution could be to avoid invoking the neardiffer at all
in the succeeding error cases, but this seemed like an ok pragmatic
solution.

Fix dotnet#91257
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 8, 2023
@ghost ghost assigned jakobbotsch Sep 8, 2023
@ghost
Copy link

ghost commented Sep 8, 2023

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

Issue Details

After #89654 SPMI replay will succeed instead of result in replay errors in expected error cases (such as BADCODE or EE exception). To support diffing such contexts, we record zero-sized assembly that the near differ uses. However, on arm64 there is some additional code that calls repCompileMethod to make some additional adjustments to the code blob, and in the "EE exception" cases we cannot replay this function, resulting in crash during asmdiff. This fixes the problem by only making the adjustments when we know there is any code.

An alternative solution could be to avoid invoking the neardiffer at all in the succeeding error cases, but this seemed like an ok pragmatic solution. However, if there are differing opinions then I would be fine with also pursuing this.

Fix #91257

Author: jakobbotsch
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch marked this pull request as ready for review September 11, 2023 15:54
@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @BruceForstall

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakobbotsch jakobbotsch merged commit 8d4f8b8 into dotnet:main Sep 12, 2023
@jakobbotsch jakobbotsch deleted the fix-91257 branch September 12, 2023 12:29
@ghost ghost locked as resolved and limited conversation to collaborators Oct 12, 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.

SPMI asmdiff errors on Arm64 Linux

2 participants