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

Fix missing relocations in NativeAOT x86 output #98740

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

filipnavara
Copy link
Member

This bug was introduced in #97413.

Output without the fix:

IN0011: 000047 mov      edx, dword ptr [ebp+0x10]
IN0012: 00004A mov      ecx, (reloc 0x40420290)
recordRelocation: 10A4E138 (rw: 10A4E138) => 40420310, type 16 (IMAGE_REL_BASED_REL32), delta 0
IN0013: 00004F call     CORINFO_HELP_NEWARR_1_VC

Output with the fix:

IN0011: 000047 mov      edx, dword ptr [ebp+0x10]
recordRelocation: 12241DAB (rw: 12241DAB) => 40420290, type 3 (IMAGE_REL_BASED_MOFFSET), delta 0
IN0012: 00004A mov      ecx, (reloc 0x40420290)
recordRelocation: 12241DB0 (rw: 12241DB0) => 40420310, type 16 (IMAGE_REL_BASED_REL32), delta 0
IN0013: 00004F call     CORINFO_HELP_NEWARR_1_VC

@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 Feb 21, 2024
@ghost
Copy link

ghost commented Feb 21, 2024

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

Issue Details

This bug was introduced in #97413.

Output without the fix:

IN0011: 000047 mov      edx, dword ptr [ebp+0x10]
IN0012: 00004A mov      ecx, (reloc 0x40420290)
recordRelocation: 10A4E138 (rw: 10A4E138) => 40420310, type 16 (IMAGE_REL_BASED_REL32), delta 0
IN0013: 00004F call     CORINFO_HELP_NEWARR_1_VC

Output with the fix:

IN0011: 000047 mov      edx, dword ptr [ebp+0x10]
recordRelocation: 12241DAB (rw: 12241DAB) => 40420290, type 3 (IMAGE_REL_BASED_MOFFSET), delta 0
IN0012: 00004A mov      ecx, (reloc 0x40420290)
recordRelocation: 12241DB0 (rw: 12241DB0) => 40420310, type 16 (IMAGE_REL_BASED_REL32), delta 0
IN0013: 00004F call     CORINFO_HELP_NEWARR_1_VC
Author: filipnavara
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@filipnavara filipnavara added the community-contribution Indicates that the PR has been added by a community member label Feb 21, 2024
@ryujit-bot
Copy link

Diff results for #98740

Throughput diffs

Throughput diffs for linux/arm64 ran on windows/x64

MinOpts (-0.01% to +0.00%)
Collection PDIFF
libraries.pmi.linux.arm64.checked.mch -0.01%

Throughput diffs for windows/arm64 ran on windows/x64

MinOpts (-0.00% to +0.01%)
Collection PDIFF
libraries.pmi.windows.arm64.checked.mch +0.01%

Details here


@BruceForstall
Copy link
Member

cc @dotnet/jit-contrib

@MichalStrehovsky
Copy link
Member

@kunalspathak could you have a look? Looks like this was broken by your recent TLS change.

@kunalspathak
Copy link
Member

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM, I don't recall why I to do this change during linux/x64 support, probably because there was a case where TLS related constant that was wrongly getting IMAGE_REL_BASED_MOFFSET reloc and should have not get it. I am running outer loop test to make sure.

@kunalspathak
Copy link
Member

@filipnavara - where was this issue hitting you? I am surprised why our outerloop didn't catch from past few weeks.

@filipnavara
Copy link
Member Author

win-x86 target which I am bringing up. It’s not part of the tests yet.

@MichalStrehovsky MichalStrehovsky merged commit 12c8769 into dotnet:main Feb 29, 2024
151 of 158 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x86 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants