mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #2308] vulkan_device_markers: clamp memoryTypeCount, guard null proc/target and unmap #2312
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2312
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2308
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-vulkan-device-markers-guards📝 Commits (1)
64da95cvulkan_device_markers: clamp memoryTypeCount, guard null proc/target and unmap📊 Changes
2 files changed (+36 additions, -3 deletions)
View changed files
📝
runtime/src/vulkan_device_markers.h(+7 -2)📝
runtime/test/vulkan_device_markers_test.cpp(+29 -1)📄 Description
Fixes bounds, null-pointer, and teardown bugs in
runtime/src/vulkan_device_markers.h:memory.memoryTypeCounttoVK_MAX_MEMORY_TYPESinDeviceMarkers::memory_type()so an oversized count cannot read pastmemory.memoryTypes[32]or shift1u << iby>= 32.DeviceMarkers::create()against a nullPFN_vkGetDeviceProcAddrloader pointer.MarkerTarget::started()/finished()against an empty target or null marker function pointers.vkUnmapMemoryin~DeviceMarkers()whenwords_ != nullptr(i.e.vkMapMemorysucceeded), avoiding unmapping unmapped memory after a failedvkMapMemory.runtime/test/vulkan_device_markers_test.cpp.Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Iruntime/src runtime/test/vulkan_device_markers_test.cpppassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Iruntime/src runtime/test/vulkan_device_markers_test.cpppassedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/src/vulkan_device_markers.h runtime/test/vulkan_device_markers_test.cppcleanClaimed in the coordination issue as: RT-VULKAN-DEVICE-MARKERS-BOUNDS-AND-UNMAP (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193601247)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.