zero grown entries in loader_resize_generic_list#1957
Merged
charles-lunarg merged 1 commit intoJul 5, 2026
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. |
charles-lunarg
approved these changes
Jul 5, 2026
|
CI Vulkan-Loader build queued with queue ID 27864. |
|
CI Vulkan-Loader build # 3607 running. |
|
CI Vulkan-Loader build # 3607 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 how the loader's internal object lists get their zero-fill guarantee across the two allocator paths.
loader_calloczeroes on both paths:loader_realloconly zeroes the grown tail on the default branch:loader_resize_generic_listdoubles a list and then trusts the new half to read as zero. That holds with the default allocator. It does not hold when the app supplies aVkAllocationCallbackswithpfnReallocation, since the callback is not obliged to zero grown memory.These lists are indexed sparsely.
icd_term->surface_listgrows past its initial 32 slots once more than 32 surfaces are live.wsi_unwrap_icd_surfacethen readssurface_list.list[surface_index]and treats a non-null value as an already-created ICD surface, so an uninitialised slot makes it skip lazy creation and hand a garbage handle to the driver. The debug messenger lists have the same shape.loader_get_next_available_entryalready zeroes its own grown half after the resize instead of trusting the allocator. This moves that guarantee into the resize helper so every list gets it. Valid-input behaviour is unchanged for the default allocator.