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

[release/7.0] [Mono] Fix OP_CHECK_THIS to read 1 byte instead of 4/8 on x86/x64/LLVM. #74762

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 29, 2022

Backport of #74638 to release/7.0

/cc @lateralusX

Codegen fix for #74179.

Customer Impact

Testing

Run and pass in main where tests have been re-enabled that original triggered the issue. Tests will be re-enabled on release/7.0 through #74738.

Risk

Low, code path should be frequently run-on CI and have been hit in the past by several tests cases, re-enabled by #74738.

IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Current implementation of OP_CHECK_THIS on x86/x64 and LLVM does a
memory read of at least 4 bytes. This creates an issue when the
target is a managed pointer, since that could point to the interior
of a type, meaning it can read pass the allocated memory causing
a crash. Fix change the size of the read to one byte since the only
reason doing the read is to validate that the reference, managed pointer
is not NULL. Reading only one byte is also inline with how it is
implemented on arm/arm64, and it will reduce potential unaligned
reads on x86/x64.

Full fix for, #74179.
@carlossanlop
Copy link
Member

Ping @marek-safar , needs an approval.

@lateralusX
Copy link
Member

lateralusX commented Aug 30, 2022

Would be good to hold back until we have run needed tests running on #74638. Seems to be CI issues occurring on several PR's. I can make a comment once that PR is merged, and we can take decision on this one after #74638 have been merged. OK?

@carlossanlop
Copy link
Member

Re-running the failed legs.

@carlossanlop
Copy link
Member

@lateralusX FYI the re-runs passed and it was approved/signed-off, but I'll wait for your confirmation to merge.

@lateralusX
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lateralusX
Copy link
Member

Failure in tvOS arm64 unrelated and occurring on a number of PR's.

@carlossanlop
Copy link
Member

@lateralusX thanks for running the additional legs. Is there anything else you wanted to check, or can I merge now?

@lateralusX
Copy link
Member

Merged PR into main today, could we let it run there for a day and if nothing pops up, merge it here during tomorrow?

@carlossanlop
Copy link
Member

@lateralusX the CI went down for maintenance yesterday, so there were no CI runs between 4pm PDT yesterday and around 9am PDT today. So if you want to wait an extra day to monitor the main branch, that's good too. We still have time.

@lateralusX
Copy link
Member

CI is still catching up. I have monitored the few PR's running any Mono related in main so far, and looks OK, will look at a couple more once CI is getting back on track.

@lateralusX
Copy link
Member

@carlossanlop, checked a several PR builds on runtime main and failures seems unrelated to corresponding change in main, so believe this is good to go.

@carlossanlop
Copy link
Member

Ping @marek-safar need an approval please.

@carlossanlop
Copy link
Member

Approved and signed off.
CI failures determined to be unrelated.
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit 340e3fa into release/7.0 Sep 7, 2022
@carlossanlop carlossanlop deleted the backport/pr-74638-to-release/7.0 branch September 7, 2022 18:37
@ghost ghost locked as resolved and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants