runtime: verify absolute archive offsets in DirectStorage batches #1323
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!1323
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1323/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?
@R0Y00 on GitHub · 2026-11-24 08:00 UTC · original
R0Y00:codex/dstorage-directory-offsets→main· +182 −0 · 4 files · 1 commits · merged 2026-11-24 08:08 UTCRefs #1198. Adds a Windows regression that isolates an incorrect first source offset while holding file identity, zlib codec, compressed length, output size and queue constant. Uses the existing RDS5 boundary reader and startup DirectStorage consumer.
Two fixture files contain 1 and 16,384 ETPF records. Their first compressed pages start at absolute file offsets 0x8100 and 0xe8100. On both files, adding 0xe0000 selects another valid stream with the same 28-byte compressed and 4096-byte decoded size. The first two submissions are ordinary. The following two submissions use the shifted first offset, then the shifted next offset at EOF, then the correct second offset read from the directory. Each request has a separate queue status and guarded destination.
Windows 11 build 26200.9974 x64 Release,
29757986. Ten complete readbacks: four original pages matched, both wrong pages returned S_OK with exactly the alternate payload, both EOF requests returned E_FAIL and preserved the destination, and both following requests succeeded with the expected data. Running the same Windows test with local synthetic files generated by Leonida's pinned writer gave the same results. The repository test uses its own writer. The origin of an offset change in a separate caller remains open.2/2 CTests, 20/20 range checks and the existing
startup_stub_consumer.exe dstoragescenario passed. The documentation check verified 290 links.@tedin7 on GitHub · 2026-11-24 08:03 UTC · original · reviewed
Reviewed and verified PR #1323 at commit
29757986f541cbaa53fb50623bd3f9a6d06bc177(looks good; no blockers).Linux Checks (
/tmp/rev-x2w-1323)git diff --check origin/main...HEAD: passed/root/.local/share/x2w-rev-venv/bin/python -B tests/docs_links_check.py: passed (16 Markdown files, 290 links)/root/.local/share/x2w-rev-venv/bin/python -B tests/bidi_controls_check.py: passed (1095 tracked files)Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP)
--preset dev):cmake --build --preset dev --target d3d12_xs_shim startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xmem_shim -- -j 6):24.17sctest --preset dev -R '^(startup_storage_directory_batch|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (startup_storage_directory_batch0.16s,startup_stubs0.50s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_shim startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xmem_shim -- -j 6):35.65sctest --preset release -R '^(startup_storage_directory_batch|startup_stubs)$' --parallel 4 --no-tests=error --output-on-failure): 2/2 passed (startup_storage_directory_batch0.14s,startup_stubs0.36s)Notes
tests/startup_storage_directory_batch.pycovers ordinary reads, shifted valid streams (full-page byte comparison), EOF rejection (0x80004005preserving0xa5guard bytes), and subsequent valid reads across two files and four submissions.dstorage_directory_batches()intests/startup_stub_consumer.cppvalidatesstdinbounds (r.file >= 2 || !r.length || requests.size() >= 32) and closes both file handles cleanly. (Minor:IsCompleteis polled oncount - 1, which relies on FIFO completion ordering, and COM/module handles are left to process exit likedstorage_checks()above it; both are fine for this test.)