XGameRuntime: accept XGameSave blob paths past MAX_PATH #777
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!777
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/777/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?
@ldeep98154deep-jpg on GitHub · 2026-11-24 05:09 UTC · original
ldeep98154deep-jpg:fix/gamesave-long-path→main· +73 −3 · 1 files · 1 commits · closed without mergingFixes #722.
MoveFileExWrefuses XGameSave blob paths longer thanMAX_PATHunless they use the extended-length form. The temporary file is written throughstd::fs, which supplies that form itself, so writes succeeded and only the final atomic replace failed withERROR_PATH_NOT_FOUND;XGameSaveSubmitUpdatereturnedE_FAIL. XCL now encodes both paths before the replace.What is in it
crates/xcl/src/hle/xgameruntime/gamesave.rs: helper that emits absolute, NUL-terminated UTF-16 paths with\\?\(or\\?\UNC\for shares) and uses it for both sides of the atomic replace.Tested
cargo test -p xcl --lib hle::xgameruntime::gamesave::tests -- --nocapture(GNU fallback): 12 passed, 0 failed, 0 ignored. The new regression test fails withE_FAIL(-2147467259) on unmodifiedmainbefore the fix.cargo +stable-x86_64-pc-windows-gnu build --workspace: finished successfully.cargo +stable-x86_64-pc-windows-gnu test --workspace -- --test-threads=4 --skip pe::tests::parses_own_test_binary_tls --skip test_title_runs_and_game_folder_is_untouched: 701 passed, 0 failed, 41 ignored, 2 filtered out.upstream/mainwith the GNU fallback toolchain:pe::tests::parses_own_test_binary_tls(no TLS directory in GNU-linked binaries) ande2e::test_title_runs_and_game_folder_is_untouched(TLS-based stub report is empty). No test printedSKIPPED <test>.Regression run
scripts/smoke.ps1could not produce the requiredmainand head-commitxcl-smokeblocks.Not tested
link.exe, so verification used the GNU fallback toolchain.scripts/smoke.ps1with a real title; a real UNC data folder; AMD or NVIDIA GPUs.AI use
@milas6669 on GitHub · 2026-11-24 05:14 UTC · original
Test report on
f57deac(PR head, basemainf4ce27c; main is nowd208e14, and the change is ingamesave.rsonly).Tested
x86_64-pc-windows-msvc, debug, NTFScargo test -p xcl --lib gamesave -- --test-threads=2: 12 passed, 0 failed on this head, against 10 passed onmaind208e14. The new tests includea_blob_past_max_path_is_saved, which passes.Not tested
\?\UNC\branch)scripts/smoke.ps1(this is a runtime change)main: I did not run it thereAI use
@mastrr9 on GitHub · 2026-11-24 05:20 UTC · original
Independent native Windows MSVC + NVIDIA RTX 5080 build/test run and code review at head
f57deac289da77e9e00213acfae969530c0092d1(covering the MSVC toolchain gap noted in the PR description).Code Review
#722:verbatim_wide_pathresolves viastd::path::absolute(p)and prepends\\?\(or\\?\UNC\for UNC paths) while preserving already-verbatim paths before callingMoveFileExW. Both unit and >260-char regression tests are solid. No issues found.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, DXC from Windows SDK10.0.26100.0, debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4pe::tests::parses_own_test_binary_tlsande2e::test_title_runs_and_game_folder_is_untouchedpass under MSVC).ok):hle::xgameruntime::gamesave::tests::a_blob_past_max_path_is_savedhle::xgameruntime::gamesave::tests::move_file_paths_are_extended_lengthgpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64)gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)Not tested
AI use: Antigravity (Gemini 4 Neon) performed the code review, ran the MSVC + RTX 5080 workspace tests, and drafted this comment.
@MesshM on GitHub · 2026-11-24 05:24 UTC · original
Test run of
f57deac289da77e9e00213acfae969530c0092d1on AMD RDNA4. I merged it onto currentmaind208e14locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 706 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 665 passed, 0 failed, 21 ignoredSKIPPED;a_blob_past_max_path_is_savedpasses.Review: Giving
MoveFileExWthe extended-length form for the final replace matches whatstd::fsalready does for the temporary write, so blobs pastMAX_PATHno longer fail only at the last step. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@ldeep98154deep-jpg on GitHub · 2026-11-24 05:30 UTC · original
Closing because runtime changes require a local title for scripts/smoke.ps1; switching to a standalone recompiler/test task.
Pull request closed