Skip to content

Conversation

@ej-sanmartin
Copy link
Contributor

Description

There's a bug caused by missing bounds checks in several SDL_Bind* and SDL_Push* GPU functions that write into fixed-size debug tracking arrays. The fix is to add validation (e.g., first_slot + num_bindings > MAX_*) before those writes to prevent immediate or downstream crashes.

Existing Issue(s)

Fixes #14679

@thatcosmonaut
Copy link
Collaborator

This looks right. Could we also check the ShaderCreateInfo structs to make sure they aren't declaring more resources than can be bound? That would catch issues sooner in execution than the binding calls.

@ej-sanmartin
Copy link
Contributor Author

Good idea, will send out another commit soon.

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.

GPU: Hitting sanitizer trap on read only buffer count > 8 on debug mode

3 participants