Skip to content

Conversation

@dwoodwor-intel
Copy link
Contributor

When called from visitCallSPIRVImageReadBuiltIn, Args only has three
elements and ImOpArgIndex is 2. This has been causing this function to
"update" an argument past the end of the vector, which caused a crash
when running transcoding/image_signedness.ll on Windows because the
debug build in Windows has bounds checking on std::vector.

With this change, it should update the correct (and not past the end)
argument instead and satisfy the Windows bounds checks.

When called from visitCallSPIRVImageReadBuiltIn, Args only has three
elements and ImOpArgIndex is 2. This has been causing this function to
"update" an argument past the end of the vector, which caused a crash
when running transcoding/image_signedness.ll on Windows because the
debug build in Windows has bounds checking on std::vector.

With this change, it should update the correct (and not past the end)
argument instead and satisfy the Windows bounds checks.
Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@bader bader requested a review from svenvh July 14, 2022 08:12
Copy link
Member

@svenvh svenvh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing!

@svenvh svenvh merged commit 6904b38 into KhronosGroup:main Jul 14, 2022
@svenvh
Copy link
Member

svenvh commented Jul 14, 2022

Since the commit introducing the issue is also on the llvm_release_140 branch, I've prepared a backport of the fix: #1551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants