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/9.0] Fixing SetSlice, Reshape, TryCopyTo. #108282

Merged
merged 6 commits into from
Sep 30, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 26, 2024

Backport of #107852 to release/9.0

/cc @michaelgsharp

Customer Impact

  • Customer reported
  • Found internally

When users call Slice on a TensorSpan, if that slice is not contiguous or dense and then Reshape is called, it can result in the user getting an IndexOutOfRangeException or exposing memory that was initially hidden. Likewise, if the user calls SetSlice on a TensorSpan that is not contiguous or dense, it can result in the user setting bits that were originally hidden from the user. We should not allow this behavior and throw an ArgumentException when Reshape is called in those situations and make sure we set the bits correctly to not touch the hidden bits. See #106539, #106537, and #106535.

Regression

  • Yes
  • No

Testing

More automated testing was added to cover the case of non-normal strides combined with slicing. It was missed because its an edge case that wasn't initially thought about.

Risk

Low risk as this is the first time 'Tensor" is being released, its going out in preview state, and we have an end user testing things out as well.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics-tensors
See info in area-owners.md if you want to be subscribed.

@michaelgsharp
Copy link
Member

@ericstj @artl93

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

LGTM. Failures here are known. @artl93 can you have a look too?

@ericstj ericstj added the Servicing-consider Issue for next servicing release review label Sep 26, 2024
@ericstj ericstj added this to the 9.0.0 milestone Sep 26, 2024
@ericstj ericstj added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 30, 2024
@ericstj ericstj merged commit 3d3a8ed into release/9.0 Sep 30, 2024
82 of 93 checks passed
@michaelgsharp michaelgsharp deleted the backport/pr-107852-to-release/9.0 branch September 30, 2024 20:16
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants