apps/victory: use dedicated Win32 HeapCreate global allocator and add VICTORY_NO_WATCH_GUARDS toggle #2424
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!2424
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2424"
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?
@faycalbaklouti on GitHub · 2026-11-25 13:14 UTC · original
faycalbaklouti:fix/win32-private-heap-allocator→main· +317 −0 · 4 files · 1 commits · openTarget upstream:
Marvisak/VIctory(also applicable toBelobug/VIctory-Belobug-AMDandfxceless/victory-fork)Problem
Sharing the default Win32 process heap (
GetProcessHeap()) between the runtime's Rust allocator and title/Wine/system allocations can cause lock inversion deadlocks when a vectored exception handler (VEH) or hook runs while another thread holds the process heap lock. Additionally, having an explicitVICTORY_NO_WATCH_GUARDSdiagnostic switch is useful when bisecting page-guard issues.Solution
apps/victory/src/private_heap.rsimplementing a#[global_allocator]backed by a dedicated Win32HeapCreateheap so runtime allocations never contend withGetProcessHeap().apps/victory/src/main.rsandapps/victory/Cargo.toml.VICTORY_NO_WATCH_GUARDStoggle incrates/victory-gpu/src/watch.rs.Verification
git apply --checkpasses cleanly onMarvisak/VIctorymain(direct zero-conflict apply).About our fork & censorship-resistant preservation effort:
This fix comes from gta6-vi-port, our open-source Linux (GE-Proton) + NVIDIA RTX 4090 fork of VIctory and peer-to-peer Radicle archival effort (mirroring 92+ community porting repositories across public Radicle seeds so open-source porting research survives centralized takedowns; open-source code only, no game files/keys/binaries).
rad:z39ofPhQC1siudH9BF3xsmAMmUqxc).onionVP9+Opus viewer:http://kwnoaeecpmxd6eetqfa7fxlymvxnh5du2i6wxr44t4mc7cgch5pw23id.onion/)@Marvisak on GitHub · 2026-11-25 15:32 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 (needs-work) was for an older state ofmain.Generated by Claude Code
victory-hle(xmem): coalesce contiguous 64 KiBMapViewOfFile3runs and add lock-free VEH retry around split-and-remap #2425@kotekompotek on GitHub · 2026-11-25 16:54 UTC · original
Both halves check out:
Private heap — the over-alignment math is subtly right but worth the comment being explicit:
size + alignis only sufficient becauseHeapAllocalready returns 16-aligned blocks andHEADER_SIZE = 8, which boundsoffset ≤ align(an unaligned base would needsize + align + HEADER - 1). Lazy CAS init and the back-pointer scheme are sound; realloc correctly avoidsHeapReAllocfor over-aligned blocks where the header would move.VICTORY_NO_WATCH_GUARDS— earlyNonefromtrackmatches the existing "untracked" path, so callers degrade the same way asruntime_memorymisses. The trade-off is correctly scoped as an env toggle: writes stop being observed, so stale textures are the expected symptom while it sidesteps the AB-BA deadlock withGUARDS.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.Merge
Merge the changes and update on Forgejo.