GPU: say when a fault lies past the end of its title memory copy #988

Open
h0useadv wants to merge 1 commit from upstream-pr/988 into main
h0useadv commented 2026-11-24 14:42:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by h0useadv on 2026-11-24T14:42:12Z.


Device-removed reports print the nearest title-memory copy below the faulting VA and the offset into it. Whether that offset is inside the copy or past its end had to be worked out by hand. On an RX 9070 XT, every page fault in #557 turned out to be past the end of a 4 MiB copy (0x1000 to 0x52000 past it): a read beyond the copied range that lands in whatever allocation follows, which DRED then names as a freed texture. See #557.

The line now ends with inside it or 0x… past its end, after the unchanged offset 0x…, so existing log searches still work:

...: 0xfe2400000+0x400000 at host 0x489000000, offset 0x403000, 0x3000 past its end
  • One file (crates/victory-gpu/src/shadow.rs), +27/−2, with a unit test for the placement.
  • cargo test -p victory-gpu --lib shadow::tests: passes.
  • cargo clippy -p victory-gpu --all-targets: no warnings.
  • cargo xtask policy: 154 files OK.
  • rustfmt: the changed lines are formatted; the file has older unformatted lines on main, left alone here.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6584349868 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/988). Originally posted by [h0useadv](https://github.com/h0useadv) on 2026-11-24T14:42:12Z. --- Device-removed reports print the nearest title-memory copy below the faulting VA and the offset into it. Whether that offset is inside the copy or past its end had to be worked out by hand. On an RX 9070 XT, every page fault in #557 turned out to be past the end of a 4 MiB copy (0x1000 to 0x52000 past it): a read beyond the copied range that lands in whatever allocation follows, which DRED then names as a freed texture. See #557. The line now ends with `inside it` or `0x… past its end`, after the unchanged `offset 0x…`, so existing log searches still work: ``` ...: 0xfe2400000+0x400000 at host 0x489000000, offset 0x403000, 0x3000 past its end ``` - One file (`crates/victory-gpu/src/shadow.rs`), +27/−2, with a unit test for the placement. - `cargo test -p victory-gpu --lib shadow::tests`: passes. - `cargo clippy -p victory-gpu --all-targets`: no warnings. - `cargo xtask policy`: 154 files OK. - `rustfmt`: the changed lines are formatted; the file has older unformatted lines on `main`, left alone here. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Zipettte commented 2026-11-24 15:04:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T14:55:03Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 089bd76: cargo test -p victory-gpu passes, 51 passed / 0 failed. Workspace baseline on main (ffe310e) was green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135158996 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7135158996). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T14:55:03Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 089bd76: `cargo test -p victory-gpu` passes, 51 passed / 0 failed. Workspace baseline on main (ffe310e) was green on the same machine (342 passed). _Tested with AI assistance (Claude)._
MichaelSmithAI commented 2026-11-24 15:04:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:57:50Z.


Both placement tests passed on an RTX 4090 under Wine/vkd3d-proton 3.2. In the added check we registered a buffer of 8,000 bytes (0x1f40) and queried its live D3D12 backing, which was 65,536 bytes. At offset 0x1f50 the formatter reported 0x10 past its end. That address is 16 bytes past the registered guest range and still inside the host buffer.

For a registered buffer, “past its end” therefore measures distance from the logical end of the nearest lower tracked copy. Identifying the view used by the stopped command still requires separate binding evidence. The fixture queried the formatter directly without inducing a GPU fault.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135234457 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7135234457). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:57:50Z. --- Both placement tests passed on an RTX 4090 under Wine/vkd3d-proton 3.2. In the added check we registered a buffer of 8,000 bytes (`0x1f40`) and queried its live D3D12 backing, which was 65,536 bytes. At offset `0x1f50` the formatter reported `0x10 past its end`. That address is 16 bytes past the registered guest range and still inside the host buffer. For a registered buffer, “past its end” therefore measures distance from the logical end of the nearest lower tracked copy. Identifying the view used by the stopped command still requires separate binding evidence. The fixture queried the formatter directly without inducing a GPU fault.
Marvisak commented 2026-11-25 01:07:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:31:25Z.


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/shadow.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148595011 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7148595011). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:31:25Z. --- <!-- victory-triage v1 head=089bd768d5f1f21fe583f1d46dafadd3ad79792d verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-gpu/src/shadow.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/988:upstream-pr/988'
git switch 'upstream-pr/988'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/988'
git switch 'upstream-pr/988'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/988'
git switch 'upstream-pr/988'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/988'
git switch 'main'
git merge --squash 'upstream-pr/988'
git switch 'main'
git merge --ff-only 'upstream-pr/988'
git switch 'main'
git merge 'upstream-pr/988'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!988
No description provided.