VFS: a .. in a console path stops at its mount's root #1161
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1170"
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 emirduran707 on 2026-11-24T12:49:47Z.
A console path with
..could leave the folder its drive is mounted on.apply_mountsput the rest of the path after the mount's target unchanged, soG:\..\data\hello.txtbecame<game folder>\..\data\hello.txt. That is a file next to the game folder, classified as a PC path, not the game'sdata\hello.txt. In the same way,T:\..\..\xreached outside the title's data folder, andS:\..\left the PLS quota. On Windows a..at a drive's root stays at the root (C:\..\xisC:\x), and on the console a mount is a drive.below_mountnow resolves.and..in what follows a mount's prefix, stopping at the mount's root. Both places inapply_mountsthat join a target and the rest of a path use it.What is in it
crates/xcl/src/vfs.rs:below_mount, used byapply_mounts; cases added tomounts_and_classification(G:\..\data\hello.txt,G:\data\..\..\..\save.dat,GAME:\.\..\data\.\hello.txt,G:\..,T:\..\..\escape.bin, and aGAME:path below the game folder).crates/xcl/tests/pls_quota.rs: the test listedS:\..\pls-otheramong paths that report the host's total. That path depended on the escape: it reached a folder outsideS:. It now checks thatS:\..\stays atS:'s root and reports the PLS quota.Tested
cargo test --workspace -- --test-threads=4ondbf5dd9: 741 passed, 0 failed, 41 ignored; no SKIPPED GPU testsmounts_and_classificationwithout the change inapply_mountsfails (G:\..\data\hello.txtgivesTranslated("…\data\hello.txt")instead ofGame { rel: "data\hello.txt" }); with itcargo test -p xcl --lib vfs::passes, 12 passedRegression run
main:
this PR:
Not tested
..in a console path; the smoke title's run is a regression check only.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by sds-228 on 2026-11-24T14:06:31Z.
Review: APPROVED
Reviewed head
dbf5dd9.cargo test -p xcl --lib vfs::→ 12 passed, 0 failed;cargo test -p xcl --test pls_quota→ 1 passed, 0 failed here. Verified the red/green claim: with only the production change reverted and the new tests kept,mounts_and_classificationfails with aTranslated(...)result; with the change it passes. Paired smoke blocks and the CI build check are present. No issue found.AI-assisted (OpenCode).
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T13:36:58Z.
NVIDIA run with the whole suite, since Not tested lists NVIDIA. The change is CPU-side, so the useful part here is the checks without the change.
Tested
stable-x86_64-pc-windows-msvc; debugdbf5dd9d83624f846accccb6f57a0b34f3eacc3c, which is on currentmain47efa2e:cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.vfs.rsas onmain, with this PR's tests):vfs::tests::mounts_and_classification:G:\..\data\hello.txtclassifies asTranslated("…\Temp\xcl_vfs_cls_…\data\hello.txt"), a file next to the game folder, instead ofGame { rel: "data\hello.txt" }.pls_quota::disk_free_space_ex_reports_pls_quota:S:\..\reports1023018004480(the host disk) instead of1048576(the PLS quota).vfs::tests, 10 runs: 10 of 10 passed (12 each)e2e+pls_quota, 3 runs: 3 of 3 passed (the test title's game-folder-untouched check included)Not tested
..in console paths; release build.AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T07:46:45Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T14:35:33Z.
Test report for
dbf5dd9d83624f846accccb6f57a0b34f3eacc3c(this PR's head), for #1607.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)x86_64-pc-windows-msvc, debug.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 741 passed, 0 failed, 41 ignored.gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64).Regression run (retail title,
scripts/smoke.ps1 -Seconds 60, release;mainbuilt from the commit in its block, this PR from its head, no uncommitted changes)main:
this PR:
Peak commit is over the 125 % rule: this PR's run peaked at 22 113 MB, 134 % of
main's 16 384 MB (frames: within 80 %). I can't tell from this whether the PR causes it: this branch is based on47efa2e490 commits older than themaincommit (06c9f55) its run is compared with and each side was run once. A smoke run of47efa2eitself or of this PR rebased onto currentmainwould separate the two.Not tested
AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:26:36Z.
merge-check claim
head:
dbf5dd9d83Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:48:34Z.
merge-check
base:
db3921dchead:
dbf5dd9d83merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2145 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at
db3921dc: 2145 passed, 0 failed, 48 ignored.review: no blocking finding; all hunks read. Checked for ways out of the mount: forward slashes, drive-relative forms, the long-path prefixes, a mount name inside a longer path, names of three dots, and trailing dots or spaces after the two dots; none gets past the mount's root. Out of this PR's scope and unchanged: a junction inside the game folder that points outside it. One earlier report in the thread measured a higher peak commit against a much newer main and was never followed up; the smoke blocks in the description are within the limits.
performance: none (one small allocation per mounted path).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T02:10:59Z.
merge-check claim
head:
dbf5dd9d83Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T02:30:16Z.
merge-check
base:
9335bc0d86head:
dbf5dd9d83merge: clean (git merge --no-commit --no-ff onto origin/main in a detached worktree; the merged tree was tested uncommitted)
build: cargo build --workspace -> ok (the PR merged and main alike, each in its own target dir)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> main and PR the same: 137 passed, 2 failed, 20 ignored outside the lib; the lib binary ends abnormally on both (0x80004005), so no lib total. SKIPPED: 28 on both (22 no wave64, 3 f16/f32 per-lane forms refused, 2 no heap windows, 1 no D3D12 debug layer). Failing: e2e test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred (no D3D12 debug layer on this PC), both fail on main too. The lib in parts: hle::d3d12x::list_x alone on 1 thread 113 passed on both; the rest on 4 threads, 0 failed before the process ends on both (PR 1738 ok, main 1739 ok). Next to the change, on 1 thread: vfs::tests:: 13 passed on both; --test pls_quota 1 passed on both. The PR's test changes alone applied on main fail: vfs::tests::mounts_and_classification (G:..\data\hello.txt is classified as a translated PC path, not Game data\hello.txt) and pls_quota's disk_free_space_ex_reports_pls_quota; both pass with the fix
review: none blocking, after reading the whole diff (vfs.rs, pls_quota.rs). below_mount runs after norm() has turned / into , so G:/../x is covered too; . and empty components are dropped, a .. pops at most to the mount's root, on both mount paths in apply_mounts (embedded "...\GAME:\rest" and a leading prefix). The pls_quota change replaces the old S:..\pls-other case, which expected an escape, with S:..\ staying at the quota's root. Out of scope, as the first check says: a junction inside the game folder pointing outside it
performance: none expected: one small Vec and one join per mounted path (reasoned, not measured)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5