Repository navigation
Conversation
…, not by function address A function has no single address in Rust (std::ptr::fn_addr_eq). In the x86_64-pc-windows-gnu build, register_token4 has two copies, one per codegen unit, so legacy_console_iids_map_to_their_own_slots failed at targets[36] == register_token4 as usize although slot 36 dispatches to register_token4. Compare each slot with the function the main vtable binds to the same GDK name, and call v2's slot 36 through the vtable to check the routing by behaviour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Kalmarv
force-pushed
the
test/slot-fn-identity
branch
from
November 23, 2026 21:03
4c3c156 to
0bb3c15
Compare
Contributor
Author
Collaborator
|
Merged into main (6da33fa) as 4c3c156, the head before your last rebase - the same patch (identical patch-id), so GitHub does not show it as merged; closing it by hand. Checked on an RX 9070 (RDNA4) with the 22 PRs merged together: 582 unit tests passed, 0 failed, the integration and e2e tests passed, and the retail game still reaches its first menu (646 frames in 30 s, no device removal). Thanks! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The windows-gnu build fails
hle::xgameruntime::api::tests::legacy_console_iids_map_to_their_own_slots, attargets[36] == register_token4 as usize. Dispatch is correct. The test assumes a function has one address, but Rust doesn't guarantee that (std::ptr::fn_addr_eq). The GNU build has two copies ofregister_token4, one per codegen unit, and the vtable slot holds the other copy.Only that test changes (
crates/xcl/src/hle/xgameruntime/api.rs, +29/−8); there are no production, linker or codegen changes.f as usize.hle::xgameruntimetests, base 956a476Mutation checks on the GNU build each fail the new test: routing slot 36 to the wrong slot, routing it to a stub, and a fake S_OK that writes no token. MSVC doesn't show the original failure, as expected, since it emits one copy. No release MSVC build was run.
Not touched: four other
as usizeaddress comparisons elsewhere in the test module, which pass on both builds today.AI-assisted (Claude Code). No game data.
🤖 Generated with Claude Code