mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1134] [CLOSED] d3d12_xs: validate pCount in detached GetFrameStatisticsX (RT-XS-FRAME-STATS-NULL-COUNT) #1167
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#1167
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/1134
Author: @Taffyyy-ops
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:fix/xs-frame-stats-null-count📝 Commits (1)
97c9807d3d12_xs: validate pCount in detached GetFrameStatisticsX (RT-XS-FRAME-STATS-NULL-COUNT)📊 Changes
2 files changed (+34 additions, -6 deletions)
View changed files
📝
runtime/shims/d3d12_xs_device.cpp(+6 -3)📝
runtime/test/xs_proxy_mock_test.cpp(+28 -3)📄 Description
Item ID:
RT-XS-FRAME-STATS-NULL-COUNT(#14 claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141449898)Summary
GetFrameStatisticsXfallback (Slot == routes.frame_statistics, default device slot81) inruntime/shims/d3d12_xs_device.cppwithFramePacer::get_frame_statistics(runtime/src/frame_pacer.h): whenpCount(a3) isnullptr, returnE_INVALIDARGinstead ofS_FALSE(without forwarding to PC slot 81ID3D12Device13::OpenExistingHeapFromAddress1).S_FALSEand zeroing*pCountwhenpCount != nullptr(including whenpStats/a4isnullptr), matchingFramePacer::get_frame_statistics.docs/d3d12_vulkan.mdanddocs/d3d12_xs_surface.mduntouched (neither states unattachedS_FALSEon nullpCount, and leaving docs untouched avoids conflicting with #1125).runtime/test/xs_proxy_mock_test.cpp(run_env_slotsinvalid-env case andcheck_presentation_wiring) with synthetic regression tests covering detached and partial-handler (get_frame_statistics == nullptr) calls with null/non-nullpCountand sentineloutbuffers, verifyingmock->calls[81] == 0.Testing & Verification
AI-assisted: yes (no game files,
LEONIDA_GAME_DIRandLEONIDA_MOVIEunset).Environment: Windows 11, MSVC 19.44 + Ninja, NVIDIA GeForce RTX 5060 Laptop GPU (driver
621.24), WARP.cmake --build runtime/build-> 0 errors, 0 new/W4warnings ond3d12_xs_device.cpporxs_proxy_mock_test.cpp.ctest --test-dir runtime/build --output-on-failure -R "^(xs_proxy_mock|device_proxy|frame_pacer|xbox_present)"): 11/11 passed (xbox_present_readback_size,device_proxy,device_proxy_trace,xs_proxy_mock,xs_proxy_mock_no_reserve,xs_proxy_mock_no_protect,xs_proxy_mock_no_handler,xs_proxy_mock_env_slots,xs_proxy_mock_env_slots_invalid,xbox_presentonNVIDIA GeForce RTX 5060 Laptop GPU,frame_pacer).python -I tests/test_ctest_registration.py: 4/4 OK.python -I scripts/check_no_game_data.py runtime/shims/d3d12_xs_device.cpp runtime/test/xs_proxy_mock_test.cpp: exited 0.git diff --check: clean.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.