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

Validate that DataFormat* attributes form a permutation. #45522

Merged
merged 1 commit into from Dec 17, 2020

Conversation

mihaimaruseac
Copy link
Collaborator

The src_format and dst_format attributes for the DataFormatDimMap and DataFormatVecPermute raw ops are supposed to determine a permutation. However, this was not validated and could result in unitialized memory accesses as well as writes outside of bounds and potential crashes.

While here, we also test that the format attributes have the needed length, add tests for all validation failure cases, remove unnecessary calls to strings::StrCat, and fix a few grammar errors.

This will be cherry-picked on the supported release branches.

PiperOrigin-RevId: 346135579
Change-Id: I1c76392382c89ad8f072d5bc93d70669851eb404

The `src_format` and `dst_format` attributes for the `DataFormatDimMap` and `DataFormatVecPermute` raw ops are supposed to determine a permutation. However, this was not validated and could result in unitialized memory accesses as well as writes outside of bounds and potential crashes.

While here, we also test that the format attributes have the needed length, add tests for all validation failure cases, remove unnecessary calls to `strings::StrCat`, and fix a few grammar errors.

This will be cherry-picked on the supported release branches.

PiperOrigin-RevId: 346135579
Change-Id: I1c76392382c89ad8f072d5bc93d70669851eb404
@mihaimaruseac mihaimaruseac added the waiting for patch release PR will be reviewed and merged only if we do a patch release since PR is not on master branch label Dec 9, 2020
@mihaimaruseac mihaimaruseac self-assigned this Dec 9, 2020
@google-cla google-cla bot added the cla: yes label Dec 9, 2020
@mihaimaruseac mihaimaruseac merged commit 9060995 into r2.0 Dec 17, 2020
@mihaimaruseac mihaimaruseac deleted the mm-cherrypick-faf7af8ef8a-on-r2.0 branch December 17, 2020 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes waiting for patch release PR will be reviewed and merged only if we do a patch release since PR is not on master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant