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

ARM-SVE: Fix validation logic for GatherVectorByteOffsetFirstFaulting tests #107165

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

amanasifkhalid
Copy link
Member

Fixes #106621. Fixes #106815.

  • In ValidateFirstFaultingResult, we pass the BoundedMemory object's underlying byte array directly to CheckGatherVectorWithByteOffsetFirstFaultingBehavior instead of first converting it to an array of the user-facing type. This way, we don't risk dropping any bytes via imprecise length conversions for byte amounts that aren't multiples of the base type's size (i.e. if the BoundedMemory object is 5 bytes long, the naive calculation inBounded.Length / Unsafe.SizeOf<Int32>() will drop the last byte).
  • In CheckGatherVectorWithByteOffsetFirstFaultingBehavior, when we're determining the expected fault result, it is not enough to check if the starting offset is out-of-bounds; we also have to factor in the size of the load to ensure the remaining bytes of the load operation fault if they walk off the end of the byte array.

@dotnet/arm64-contrib PTAL. All GatherVectorFirstFaulting tests pass under stress modes. Thanks!

@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 Aug 29, 2024
Copy link
Contributor

@SwapnilGaikwad SwapnilGaikwad left a comment

Choose a reason for hiding this comment

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

LGTM!

@amanasifkhalid
Copy link
Member Author

@dotnet/jit-contrib could you PTAL? Thanks!

@amanasifkhalid amanasifkhalid merged commit 4df1b9a into dotnet:main Aug 30, 2024
68 of 70 checks passed
@amanasifkhalid amanasifkhalid deleted the fix-firstfaulting-tests branch August 30, 2024 19:42
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
3 participants