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

Open
github-bot wants to merge 1 commit from github-bot/gh-988 into main AGit
Owner

@⁠h0useadv on GitHub · 2026-11-24 14:42 UTC · original
h0useadv:gpu/fault-past-copy-end → main · +27 −2 · 1 files · 1 commits · open

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

**@⁠h0useadv** on GitHub · 2026-11-24 14:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/988) `h0useadv:gpu/fault-past-copy-end` → `main` · +27 −2 · 1 files · 1 commits · open 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)
Device-removed reports print the nearest title memory copy below the
faulting address and the offset into it. Whether that offset is inside
the copy or past its end had to be worked out by hand; on RDNA4 every
#557 page fault was past the end (0x1000 to 0x52000 past a 4 MiB copy),
a read beyond the copied range that lands in whatever allocation follows
and that DRED then names as a freed texture. The report now says
"inside it" or how far "past its end".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:16:03 +00:00
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 14:55 UTC · original

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).

**@⁠Zipettte** on GitHub · 2026-11-24 14:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7135158996) 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)._
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 14:57 UTC · original

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.

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 14:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7135234457) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:31 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/988#issuecomment-7148595011) <!-- 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 has changes conflicting with the target branch.
  • crates/victory-gpu/src/shadow.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/988/head:github-bot/gh-988'
git switch 'github-bot/gh-988'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-988'
git switch 'github-bot/gh-988'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-988'
git switch 'github-bot/gh-988'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-988'
git switch 'main'
git merge --squash 'github-bot/gh-988'
git switch 'main'
git merge --ff-only 'github-bot/gh-988'
git switch 'main'
git merge 'github-bot/gh-988'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!988
No description provided.