mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:10:51 +01:00
[PR #1716] tests: slot 133 teardown leaves nothing at vkDestroyDevice (RT-SLOT133-STANDIN-LEAK) #1730
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#1730
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/1716
Author: @Tyrannys
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:claude/slot133-standin-leak-adc6b3📝 Commits (3)
573c918tests: d3d12test::Ref releases on= {}; slot 133 teardown test (RT-SLOT133-STANDIN-LEAK)63a96d1Merge remote-tracking branch 'upstream/main' into claude/slot133-standin-leak-adc6b33819f0atests: leave the Ref change to #1758 (TEST-REF-MOVE-ONLY)📊 Changes
2 files changed (+140 additions, -0 deletions)
View changed files
📝
runtime/CMakeLists.txt(+8 -0)➕
runtime/test/xbox_slot133_teardown_test.cpp(+132 -0)📄 Description
Claimed in the coordination issue as: RT-SLOT133-STANDIN-LEAK (ubiquitarianism/leonida#1608)
Depends on: #1758
What and why
The finding in #1608 (and adrianmjim's run on #1558): after a slot 133 placement,
vkDestroyDevicereports 57-63 objects that were never destroyed (VUID-vkDestroyDevice-device-05137) underLEONIDA_VK_VALIDATION=1. The leak comes from the test helper, not the runtime.d3d12test::Refhad no assignment operator of its own, soplaced = {};copied a null pointer over the reference and never calledRelease. The placed texture kept its reference to the device proxy, and the whole D3D12 device was still alive atvkDestroyDevice. I took the runtime's slot 133 paths one at a time (provider refusal → host-address texture → committed stand-in) and none holds a reference after release.adrianmjim's #1758 (TEST-REF-MOVE-ONLY) makes the same
Refchange: move-only, andref = {}releases. It is equivalent to the change this pull request first carried, so that part has been reverted here (in a new commit; the history is unchanged), and theReffix is left to #1758. This pull request now only adds a regression test for slot 133 teardown.The new
xbox_slot133_teardowntest needs no game files. Through slot 133 on the Vulkan device behind the proxy, it places:It drops each one with
= {}and checks that the proxy's reference count is back where it was. Then it releases the device and reads the validation error count only aftervkDestroyDevice.Tested
NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11, MSVC, Ninja RelWithDebInfo. Branch with current
main(a73a57e13) merged in.d3d12_test_shaders.h(heada8a56cb47; it differs frommainonly inRef):xbox_slot133_teardownpasses plain and withLEONIDA_VK_VALIDATION=1, with no VUID reported.Reffix (this branch on its own): it fails, with VUID-vkDestroyDevice-device-05137 for the objects of the device that is still alive. So this pull request should merge after #1758.Refchange, the wholectestpassed (403/403) and #1558's test was clean under validation.check_no_game_data.pyon the changed files is clean. The game was not run.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.