mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:55:52 +01:00
[PR #4] [MERGED] d3d12_xs: only take the console slot-14 layout when the descriptor size agrees #60
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#60
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/4
Author: @yyc160
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:slot14-range-guard📝 Commits (1)
37246f1d3d12_xs: only take the console slot-14 layout when the descriptor size agrees📊 Changes
1 file changed (+16 additions, -3 deletions)
View changed files
📝
runtime/shims/d3d12_xs_device.cpp(+16 -3)📄 Description
Fixes the false positive in #3.
proxy_create_descriptor_heaptreated a readable, non-zero word after the PC description as a console address. A normal 16-byteD3D12_DESCRIPTOR_HEAP_DESCis almost always followed by readable, non-zero memory, so every ordinary heap created through the proxy entered the console path and reported that word as its CPU handle; the firstCreate*Viewthen wrote through it.The console layout carries a size as well as an address, and that size is 32 bytes per descriptor. A PC desc's trailing words are whatever the caller holds next and do not encode
NumDescriptors * 32, so requiring the agreement separates the two layouts without guessing anything about the address.I also tried requiring the range to be a committed, writable
VirtualQueryregion. That is a true property of the console layout, but it rejectsd3d12_console_descriptor_heap_test's synthetic address, and a console heap whose VA is not backed by title memory would fail it too, so I left it out. Size alone is enough for the corpus here.Measurements
Windows 11, MSVC 14.44.35207, Windows SDK 10.0.26100.0, Ninja, RTX 5070 Ti with driver 32.0.16.1742. Base is
main@2e4715746; the only difference between the two rows is this commit.main@2e4715746main@2e4715746+ this commitd3d12_descriptorgoes from exit 139 to exit 0. The 18 tests that stop failing are the ones that create a heap through the proxy and then write through the handle:The four that still fail fail identically with and without this change, and are unrelated to descriptor heaps:
root_sig:FAIL blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum,FAIL shim deserializer accepts an all-zero-checksum Xbox blob with the high byte clearedd3d12_com,d3d12_vulkan_device:ExecuteCommandLists failed: a list is not closed; nothing was submittedandinvalid copy or resolve; nothing was submittedd3d12_depth_resolveNothing here quotes the executable: test names, a file:line and pass/fail only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.