fix(victory-hle): stabilize and restore real remapping in xmem remap-gap test #393
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!393
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-393"
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?
@Lewandox on GitHub · 2026-11-26 15:42 UTC · original
Lewandox:fix/victory-hle-xmem-flaky-remap-test→main· +22 −10 · 1 files · 2 commits · merged 2026-11-26 16:49 UTCSummary
Fixes the flaky
victory-hlexmemtesta_read_in_place_never_meets_the_gap_of_a_remappingnoted indocs/rust-full-status.md("fails about 3 times in 8 on the unmodified file"):map_pages'sremap_same()fast path skips unmapping/remapping when the exact same page slice[pages[0], pages[1], pages[2]]is passed repeatedly, making the 2,000-iteration loop finish in sub-millisecond time without exercising the unmap/remap gap at all.stop = true, so on contended or fast runs the main thread could finish and stop the reader before it executed a single read (reads == 0), failingassert!(reader.join()... > 0).third_party/victory/crates/victory-hle/src/modules/xmem.rs):[pages[0], pages[2], pages[1]]and[pages[0], pages[3], pages[1]]) so each page keeps a single-page placeholder,remap_same's fast path never short-circuits, andpages[0](byte1) stays mapped atawhile every call genuinely unmaps and remapsaundertitle_memory_remapping_range.std::sync::Barrier::new(2)(withRelease/Acquireordering onstop) and keep reading untilstopis set after at least one read.Verification
cargo test --release -p victory-hle --features diagnostics --lib xmem(20 consecutive parallel runs: 20/20 passed)cargo test -p victory-hle --features diagnostics --lib xmem(all xmem tests passed)cargo xtask policy(inthird_party/victory):asset policy: 214 files ok