Watch: mapped image memory is not tracked as GPU memory #2237
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2237
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2237/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@denkencar-sketch on GitHub · 2026-11-25 08:31 UTC · original
denkencar-sketch:fix/watch-image-memory→main· +15 −2 · 1 files · 1 commits · closed without mergingSummary
runtime_memory(at, true)accepts "anything but plain committed private memory", which includes committedMEM_IMAGEmemory: the title's own.rdataor.data. From readingshadow::loose(a 4 MiB-aligned shadow) I expect it can reach such memory, and span.textas well; I have not run that path. A tracked page is madePAGE_READONLYwhen taken, which also removes execute access from code that shares its 64 KiB page. The next instruction fetch there is an execute access violation, which the guard handler ignores (it only handles writes), and the process crashes.Change
Mapped images are refused, as plain heap memory already is. It leaves
MEM_FREEas it is (that is #1849's change), so the two do not overlap. An untracked shadow is refreshed as any plain memory is.Testing
watch::tests::image_memory_is_not_trackedcallstrackon a static in this test binary's image and on one of its functions: onmainboth are tracked; with this change neither is. The test never takes the pages, so it cannot make code unexecutable.cargo clippy --workspace --all-targets [--all-features] --locked -- -D warningsis clean.Not tried: the loose-shadow path in the game, so I have not seen a title's data actually land in a tracked page. The premise (image memory passes
runtime_memory) is what the test shows.modules::dstorage::tests::a_page_list_filled_after_its_request_startsfails now and then onmaintoo (5 of 20 runs ofcargo test -p victory-hle --lib); it is unrelated.AI-assisted.
@MamaLeVrai on GitHub · 2026-11-25 09:13 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head
74e33471intomain940d32fin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with--all-features: clean.cargo test --workspace --locked: 702 passed, 0 failed, 10 ignored, two runs (mainalone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
@Marvisak on GitHub · 2026-11-25 12:44 UTC · original · edited 2026-11-25 16:05 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/watch.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge-candidate) was for an older state ofmain.Generated by Claude Code
@denkencar-sketch on GitHub · 2026-11-25 23:12 UTC · original
Closing as superseded: commit
280b1505added the \info.Type != MEM_IMAGE\ check tountime_pages\ in \watch.rs\ on \main.
Pull request closed