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

DXC Validator doesn't error on out of bounds access at index -1 #7162

Open
spall opened this issue Feb 26, 2025 · 0 comments
Open

DXC Validator doesn't error on out of bounds access at index -1 #7162

spall opened this issue Feb 26, 2025 · 0 comments

Comments

@spall
Copy link
Collaborator

spall commented Feb 26, 2025

The validator doesn't catch '-1' used as a vector index:
https://hlsl.godbolt.org/z/MoeTbjnz4

Expected behavior:
error: validation errors

:5:10: error: Access to out-of-bounds memory is disallowed. note: at '%6 = getelementptr [2 x i32], [2 x i32]* %1, i32 0, i32 -1' in block '#0' of function '�?foo@@yahhh@Z'. Validation failed.
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

No branches or pull requests

1 participant