clamp re-queried extension count in enumeration helpers#1943
Merged
Conversation
|
Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
1 similar comment
|
Author aizu-m not on autobuild list. Waiting for curator authorization before starting CI build. |
|
CI Vulkan-Loader build queued with queue ID 13074. |
charles-lunarg
approved these changes
Jun 22, 2026
charles-lunarg
left a comment
Collaborator
There was a problem hiding this comment.
All of these two call patterns remind me why I appreciate the helper function I added to vulkaninfo. It takes a function pointer, arguments, and optional default value, then returns (in a std::vector) the contents. Granted its C++ but if the intervening logic wasn't as extensive I'd try to abstract the 2 call pattern here too.
|
CI Vulkan-Loader build # 3576 running. |
|
CI Vulkan-Loader build # 3576 passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracing the device extension enumeration helpers for the misbehaving-driver case the recent *2KHR clamps covered, the same shape turns up in the plain enumeration paths that fill a loader-internal scratch array.
Clamped each loop to the snapshotted allocated count, same idea as the emulation terminators. Six sites: loader_add_instance_extensions, loader_add_device_extensions and check_physical_device_extensions_for_driver_properties_extension in loader.c, terminator_GetPhysicalDeviceToolPropertiesEXT in extension_manual.c, and the two PCI-bus checks in loader_linux.c.