Repository navigation
Conversation
…rgument A retail game crashed during its world loading, every run: an access violation in a memcpy writing to title memory that was never reserved, mapped or committed. The writer was XCL's XGTextureAddressComputer::CopyFromSubresource (vtable xcl-dev#9), called by the game as (linear dst, plane, subresource, 0, tiled src, row pitch, slice pitch): its library has a 32-bit argument before the source pointer, which the library the oracle test uses (XDefiant's) does not. Read the 6-argument way, the source was the 0 dword with the stack slot's old upper half, and the row pitch the low half of the real source pointer, so the second row went gigabytes past the destination. The game calls both forms, so they are told apart per call: a value of 16 bits or less in the fourth slot with address space in use at the fifth is the newer form (address space, not readable memory: title pages are committed on first use). A nonzero added argument is logged once and ignored; its meaning is not known. New test: both forms tile the same bytes and read them back, with garbage in the upper half of the added argument's slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
|
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 26, 2026
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.
Stacked on #1435; only the top commit,
767f439, belongs to this PR. The dependency keeps its original author.The existing ABI regression covers a single RGBA8 surface. These two CPU tests extend it to pitched mip levels, array slices, separate depth/stencil planes, BC1/BC3 blocks and 3D textures. They also cover a source whose address space is reserved but not committed, and stale upper stack-slot bits around the added 32-bit argument.
What is in it
crates/xcl/src/hle/xg.rs, tests only: 10 descriptors and 512 copy calls through the six- and seven-argument vtable forms. Expected bytes are placed per element; reads use that reference rather than the preceding copy's output. Whole-buffer comparisons check row/slice padding, other subresources and trailing sentinels too.PAGE_NOACCESSsource without reading it, three added-argument values, three stale upper halves, and unused trailing-slot values in the older form.Tested
14c8a2d:cargo test --locked -p xcl --lib hle::xg::tests -j2 -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, 0 skipped.8b4d42c): the same command: 6 passed, 0 failed, 0 ignored, 0 skipped.maine0d93c8(this branch,767f439): the same command: 6 passed, 0 failed, 0 ignored, 0 skipped.main2898511+ D3D12.X: XG CopyInto/FromSubresource take the newer library's added argument #1435, headaec6fa1) also pass in release: 6 passed, 0 failed, 0 ignored, 0 skipped; 512 copy calls.Not tested
Merge prerequisites