upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_aftermath.cpp
diff options
context:
space:
mode:
authorTreXito <81475944+TreXito@users.noreply.github.com>2026-11-23 21:54:19 +0000
committerTreXito <81475944+TreXito@users.noreply.github.com>2026-11-23 21:54:19 +0000
commit4154ab0a62463bb8c9cb4011b5b34c66405a36b5 (patch)
tree56c0b933c1071d084ad5255f3aff1c0108f176b3 /runtime/src/vulkan_aftermath.cpp
parentd030b991282748d5bbbd11a20eae6c6ea65ef36d (diff)
d3d12_xs: a struct-return argument on the caller's stack is the return buffer, not the device
Device slots 25, 26, 56 and 108 tell the C form (buffer, device) from the PC form (device, buffer) by which argument starts with the proxy vtable pointer. A title's return buffer is uninitialised stack memory and can still hold that pointer from an earlier call; both arguments then look like the proxy and the struct is written over it (xcl found this on a retail title). A device proxy is a heap object, so an argument inside the calling thread's stack is taken for the buffer. xs_proxy_mock_test: check_struct_return_stale_vtable puts a stale copy of the vtable pointer in a stack buffer and calls slots 25 and 108 in the C form and slot 26 in both forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions