mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #1223] vulkan_present: guard make_capture_buffer against a null memory-properties pointer (RT-PRESENT-CAPTURE-NULLGUARD) #1255
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#1255
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/1223
Author: @Miici0
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/xbox-present-capture-null-guard📝 Commits (2)
f849034vulkan_present: guard make_capture_buffer against a null memory-properties pointer4d3159avulkan_present: check the memory-properties pointer before creating the buffer📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
runtime/src/vulkan_present.h(+1 -0)📄 Description
Claimed in the coordination issue as: RT-PRESENT-CAPTURE-NULLGUARD (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143716337)
Depends on: none
Fixes: none
What and why
make_capture_buffer()inruntime/src/vulkan_present.hcalledvkGetPhysicalDeviceMemoryProperties_(physical_, ...)without checking the function pointer for null first, unlikeprepare_compose()right above it, which does guard it. Found while investigating the intermittentxbox_presentcrash reported in #14 (finding at https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143642803). This does not claim to fix that crash — the root cause there is still unconfirmed (it reproduces only throughctest, at roughly a 2% rate, and disappears under any validation layer or debugger, so it couldn't be caught live after over 100 attempts). This just closes a real null-pointer-call gap found along the way: if the extension function were ever unavailable, this call would crash immediately and unconditionally instead of failing the capture-buffer setup cleanly, as its sibling function already does.Tested
ctest --test-dir runtime/build -C RelWithDebInfo -R "^xbox_present$": passes (2.99s). Full portable test suite otherwise unaffected (single-line, behavior-preserving guard; the function pointer is non-null in every environment observed, so this only changes behavior in the previously-unguarded null case).GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11 26300.9974, Vulkan SDK 1.4.363.1.
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.