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

[naga] Validate override array sizes. #6882

Merged

Conversation

jimblandy
Copy link
Member

When an array type A's size is PendingArraySize::Override(h), verify that:

  • h is a valid override handle,

  • the override's type precedes A in the type arena, and

  • the override's expression does not participate in a type/global expression cycle.

Fixes #6880.

When an array type `A`'s size is `PendingArraySize::Override(h)`,
verify that:

- `h` is a valid override handle,

- the override's type precedes `A` in the type arena, and

- the override's expression does not participate in a type/global
  expression cycle.

Fixes gfx-rs#6880.
@jimblandy jimblandy added type: bug Something isn't working area: validation Issues related to validation, diagnostics, and error handling naga Shader Translator labels Jan 8, 2025
@jimblandy jimblandy requested a review from a team as a code owner January 8, 2025 21:15
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Good stuff!

@teoxoy teoxoy added this pull request to the merge queue Jan 9, 2025
Merged via the queue into gfx-rs:trunk with commit 6e2394b Jan 9, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling naga Shader Translator type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[naga] Handle validation should check array size override initializer handles too
2 participants