You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
this_first: a test of the stale-vtable return buffer and either argument order - #263
A test for real::this_first (7a033c8) - synthetic objects only, no GPU and no title.
Covers:
either argument order with one adopted object;
neither adopted / null: unchanged; one null argument: the other is this, either position;
the retail case: an object off the stack and a stack return buffer whose first word is a stale copy of its vtable pointer - both look adopted, and the stack one is the buffer in either order;
both on the stack, neither the device: the C++ way (a).
The fake adopted object is built the way queue_tests builds its fake queue (the extension vtable's word before slot 0 points at a PC table, registered in EXTS, removed after).
While writing it I also ran a native MSVC x64 probe of the member-call ABI on this machine (Ryzen 7 9800X3D, Windows 11, MSVC 14.44): for a member function returning a 16-byte struct, rcx = this and rdx = the hidden return buffer, and the compiler reuses the same stack slot for the return buffer across calls at the same stack depth - which is how a stale vtable copy ends up in it. Consistent with the crash this fixed.
Tested
Ryzen 7 9800X3D, RTX 3060 Ti 8 GB (driver 32.0.16.1742), 32 GB, Windows 11, rustc 1.100.0-nightly, release
cargo test --workspace -- --test-threads=4: 612 passed, 0 failed, 20 ignored; plus the other suites: 13+3+1+3+2+7+1+1+2+1+6 passed, 0 failed, 4+12 ignored
SKIPPED on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)
Regression run (below): main 1937 frames / PR head 2179 frames in 90 s, no device removal, no crash, peak commit 15.4 GB / 14.7 GB
Not tested
AMD GPUs, wave64 hardware
the retail title's later gameplay (the run reaches the first menu; audio stutter observed there - see below)
XAudio2 behaviour: the 90 s runs show the menu's audio stuttering on both main and this PR (the PR adds a test only, no runtime change), so this is not covered here
AI use
GPT-6.2 Astra (API model selector), working as the coding agent in this session: wrote the test and this description, ran the tests, the smoke runs and the native ABI probe on the machine above. The human contributor reviewed the diff and the measurements.
SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
PR's test: hle::d3d12x::real::this_first_tests::a_return_buffer_with_a_stale_vtable_copy_is_not_the_object ... ok
main4017f8f on the same machine, same command: 650 passed, 0 failed, 40 ignored, same 2 SKIPPED. The test commit 2f5979e is on 9ab7d76; the head 130a143 is a merge of main into the branch.
Tested the head itself; it merges cleanly into main4017f8f (git merge-tree), the merge result was not tested.
Not run here: the two e2e tests that run the test title (test_title_runs_and_game_folder_is_untouched, test_title_draws_with_a_root_signature_under_the_debug_layer): they open the XCL game window and this PC was in use (the 2 "filtered out").
Not tested
Retail title regression run (no game copy here; the PR adds a test only).
AI use: Claude Code with Claude Opus 5.5 (ran the tests and wrote this report).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A test for
real::this_first(7a033c8) - synthetic objects only, no GPU and no title.Covers:
this, either position;a).The fake adopted object is built the way
queue_testsbuilds its fake queue (the extension vtable's word before slot 0 points at a PC table, registered inEXTS, removed after).While writing it I also ran a native MSVC x64 probe of the member-call ABI on this machine (Ryzen 7 9800X3D, Windows 11, MSVC 14.44): for a member function returning a 16-byte struct,
rcx= this andrdx= the hidden return buffer, and the compiler reuses the same stack slot for the return buffer across calls at the same stack depth - which is how a stale vtable copy ends up in it. Consistent with the crash this fixed.Tested
cargo test --workspace -- --test-threads=4: 612 passed, 0 failed, 20 ignored; plus the other suites: 13+3+1+3+2+7+1+1+2+1+6 passed, 0 failed, 4+12 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Not tested
Regression run
main (9ab7d76):
this PR's head (130a143, no uncommitted changes):
AI use
GPT-6.2 Astra (API model selector), working as the coding agent in this session: wrote the test and this description, ran the tests, the smoke runs and the native ABI probe on the machine above. The human contributor reviewed the diff and the measurements.