GPU: unprotect guarded alias pages when their last tracker drops #3154
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!3154
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3154"
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?
@reeledMarek on GitHub · 2026-11-26 10:27 UTC · original
reeledMarek:fix/gpu-watch-drop-unprotect-aliases→main· +45 −1 · 1 files · 1 commits · openSummary
Tracked::take_splitcallsguard_aliases, marking aliased virtual pagesPAGE_READONLYand inserting them intoGuards::protectedeven when no tracker holds those alias pages directly inGuards::holders.Tracked::dropincrates/victory-gpu/src/watch.rspreviously only calledopen(&mut g, page)for the dropped tracker's own pages and never opened their aliases, leaving alias pages permanentlyPAGE_READONLYand stranded inGuards::protectedafter all trackers watching them or their aliases are dropped.dropping_the_last_tracker_unprotects_guarded_aliasesverifying bothGuards::protectedcleanup andPAGE_READWRITErestoration.@cloph-dsp on GitHub · 2026-11-26 11:25 UTC · original
Independent local verification of head
079d9e2on Windows 11, Rust 1.100.0/MSVC:cargo test --locked -p victory-gpu --lib dropping_the_last_tracker_unprotects_guarded_aliases— 1 passed, 0 failed.git diff --check origin/main HEAD— clean.CPU-only guarded-alias test; no D3D12 device or game assets used. Worktree-local
CARGO_TARGET_DIR. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only). No game data.@Dukestar69 on GitHub · 2026-11-26 11:29 UTC · original · approved these changes
Verified against
origin/main(63bcca4):cargo test -p victory-gpu --lib watch:: -- --test-threads=1: 16/16 passed (includingdropping_the_last_tracker_unprotects_guarded_aliases).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly unprotects guarded alias pages when their last tracker is dropped.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@futurepro62 on GitHub · 2026-11-26 21:34 UTC · original
NVIDIA full-suite run, to go with the reports above by Dukestar69, cloph-dsp, since none of them names a GPU run. Tested exact head
079d9e2(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 867 passed, 0 failed, 10 ignored.dropping_the_last_tracker_unprotects_guarded_aliases.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.