Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 1, 2022

Backport of #74888 to release/7.0

/cc @VSadov

Customer Impact

UniversalTransition stubs call managed helpers to figure what target method needs to be called. To ensure that the helper does not mess up the arguments which will be passed to the target method, we store the content of argument registers on the stack and restore after calling the helper.

The issue was that we were only storing the lower floating-pont halves of vector registers.
Even though unlikely, there are several ways how the helper could use vector registers indirectly. Most notably, a GC may happen (since it is managed code) and there is a possibility that some native functions used by GC, like memcopy could be vectorized now or in the future and change the value of vector registers.

To ensure that there is no silent data corruption, we need to save/restore complete SIMD registers, not just their lower halves.

Testing

Risk

Low. We do the same thing, we just store/restore q0-q7 128bit registers instead of d0-d7, which are the lower 64bit parts.

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. once we have a green ci we can merge.

@carlossanlop
Copy link
Contributor

Approved, signed-off, CI is green. Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit d70efc8 into release/7.0 Sep 2, 2022
@carlossanlop carlossanlop deleted the backport/pr-74888-to-release/7.0 branch September 2, 2022 16:43
@ghost ghost locked as resolved and limited conversation to collaborators Oct 2, 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.

5 participants