VFS: a copy or move with a bad source fails before staging the overlay #1769
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1779"
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?
Imported from ivall/xcl. Originally posted by Luislariosss on 2026-11-24T20:36:08Z.
A copy or a move whose source is missing or is a directory, and a copy of a game file onto itself, staged overlay data before the source was ever looked at:
prepare_copyandmove_file_vfsrandest_offirst, creating the destination's overlay directories, and only then noticed the source was bad.What is in it
missing_source_error: a copy/move source that does not exist fails withERROR_FILE_NOT_FOUNDbeforedest_ofruns (move_file_vfs,prepare_copy).ERROR_ACCESS_DENIED.to_lowercase, so accented case pairs are caught too; a self-copy is handed to Win32 as the same path instead of staging the overlay.copy_and_move_reject_bad_sources_before_staging_the_overlay: self-copy (same path, case-differing, accented), directory source, missing external source for both copy and move — asserting the overlay is untouched in every case.Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2609.5 throughXCL_DXC_DIR;CARGO_PROFILE_TEST_DEBUG=0.cargo test -p xcl --lib vfs_hooksat the head: 11 passed, 0 failed. The new test fails without the fix.cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4): 876 passed, 0 failed, 38 ignored (20 test binaries;SKIPPED:pso_measurement_compiles_an_exact_synthetic_record— cannot disable the driver cache;heap_window_out_of_memory_falls_back_to_the_switch_form— no heap windows).title:line readsretail-title, the folder name is withheld):main (
85e3826, clean tree):head (
35bd1e6, clean tree):Not tested
xcl.log).AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:26:35Z.
Full-suite run, since this PR has no test report yet. Tested exact head
35bd1e6(on its base85e3826).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 874 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.copy_and_move_reject_bad_sources_before_staging_the_overlay.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 876 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:24:42Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:27:07Z.
PR #1779 — VFS bad-source copy and move verification
Tested clean detached head
35bd1e6ec29a52ca9e7179d684b3321e510bfa9b. The change invfs_hooks.rschecks for missing external sources and directory copy sources before staging the overlay. Game-file self-copies use the same underlying path for Win32 to reject.Tested
DoublePrecisionFloatShaderOps=0. The D3D12 SDK layers DLL was absent. DXC/DXIL 1.9.2609.5, Rust 1.100.0 (0ef1bc386, 2026-11-09).cargo build --workspaceandcargo test --workspace --no-runsucceeded with debug info and incremental compilation disabled.cargo test -p xcl vfs -- --nocaptureyielded 23 passed, 0 failed, 0 ignored, 0 explicit skips. The newcopy_and_move_reject_bad_sources_before_staging_the_overlaytest passed in both runs. It verified that missing external copies and moves returnERROR_FILE_NOT_FOUND, directory copies returnERROR_ACCESS_DENIED, and identical and case-varied game-file self-copies fail. It checked that the overlay stayed untouched and the original self-copy source files retained their contents.cargo test --workspace --no-fail-fast -- --test-threads=4run under the Arc lock withXCL_ADAPTER=A770exited 101. The 20 result summaries inpr1779-suite.logsum to 858 passed, 18 failed, 42 ignored. Four explicitSKIPPEDlines are included in the harness's pass total and excluded from coverage.Failures and skips
0x80070057), including FP64 cases. Four reported mismatches in fused multiply-add, implicit-LOD sampling, FP16 high-half preservation, and wave64 pixel reductions. The end-to-end title had one failure in its dynamic depth-bias check (RSSetDepthBiasX, #94).0x887A002D), and one for lack of heap windows.Not tested
Retail-title smoke runs on main and PR head, other GPUs or drivers, and the release profile were outside this run.
AI use
T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1779-suite.logand published this report.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:01:48Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:45:58Z.
Triage (#1607) – head
35bd1e6No open or merged PR makes the same change. Main's
prepare_copyandmove_file_vfsstill calldest_ofbefore they check a missing external source, a directory source or a self-copy. Other openvfs_hooks.rsPRs touch other functions (#2982 changes only the delete inmove_file_vfs).No problems found in the diff.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-02T20:14:59Z.
merge-check
base:
5ad98adbc3head:
35bd1e6ec2merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3006 passed, 0 failed, 52 ignored (3004 / 0 / 52 on
817eb1f, plus this PR's test and 1 that main gained since); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: nonereview: read the whole diff (1 file, +67). No blocking findings. Main still has the bug.
Unchanged and equal to Windows in both: self-copy with fail-if-exists (80), a directory onto itself, a missing game file, a file onto a directory, copying a file from the game or from temp, and moving a file or a directory from temp.
2) A behaviour change to know about: a title that copies a file onto itself and ignores Windows' error is fine, but one that got "success" from XCL now gets error 32, as on Windows.
3) This head shows only the
PR descriptioncheck.Build and test (Windows, no GPU)has not run on it, so it needs a CI run before the merge. It builds and passes here.4) Not tested: a retail title (none on this machine). I called the W copy and move hooks;
CopyFileExandCopyFile2go through the sameprepare_copybut were not in my comparison.performance: one or two extra file lookups per copy, one per move from outside the game folder (reasoned, not measured)
verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.