startup: distinct DirectStorage error codes and null-argument checks #2170
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2178"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T02:59:50Z.
Part of #1843
What this unblocks: a caller of the DirectStorage stand-in can tell a too-small destination from a read past the end of a file, and bad null arguments are refused instead of accepted silently.
Changes:
0x8007007A(ERROR_INSUFFICIENT_BUFFER); a file read at or past the end, or crossing it, reports0x80070026(ERROR_HANDLE_EOF). Other causes stayE_FAIL. The status entry and the first-failure record carry the same code.OpenFilewith a null path andCreateQueuewith a null descriptor returnE_INVALIDARG; a null output returnsE_POINTER; the output is nulled on refusal.E_FAILfor these causes now expect the specific code.startup_dstorage_destination_checkgains positive and negative cases on the real stand-in DLL.docs/startup-runtime.mddocuments the codes.Verification:
python3 -B tests/docs_links_check.py-> PASS (18 files, 401 links), Linux.python3 -B tests/run_checks_parallel_check.py-> PASS, Linux.x86_64-w64-mingw32-g++ -std=c++17 -fsyntax-onlyonxcrdapi.cppand the changed fixtures -> no errors apart from MSVC-only__try/__exceptinlocal_log.h.3cea0e4b, default 3-slot pool:python3 x2w_pipe.py win2025 2178with the auto-discovered targets plusstartup_storage_worker_start.ctest --preset dev17/17 passed, 0 skipped.ctest --preset release17/17 passed, 0 skipped.0x80070026for the EOF case;Enqueuenow catches a failed queue growth inside the lock scope so astd::bad_allocno longer leaves the queue mutex held (startup_storage_worker_start, alloc sweep N=5, previouslyan exception left Submit).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T03:59:24Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
3cea0e4ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T04:05:03Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
3cea0e4bbcℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T04:20:50Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-25T04:05:03Z.
Code review location:
tests/cpu/archive/directory_gpu.cpp; line 82Every
begin_batch()call now passes this 32-byte array tofactory_create_queue, but that function unconditionally reads 40 bytes from each non-null descriptor insrc/startup_stubs/xcrdapi.cpp:355-357. Queue creation therefore reads eight bytes past the stack buffer; an ASan probe using the same logging loop reproduces a stack-buffer-overflow. Allocate at least0x28bytes here and for the newly added descriptor indstorage_directory_batches()so the archive fixtures do not introduce an out-of-bounds read.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T04:20:50Z.
Code review location:
tests/cpu/archive/directory_gpu.cpp; line 82Fixed in
4ebbf8aa: every queue descriptor passed to factory slot 10 is now 0x28 bytes (directory_gpu.cpp and the other startup storage/dstorage fixtures that used 0x20), so the factory's 40-byte read stays in bounds.Verification (Win2025, 3-slot pool,
x2w_pipe.py win2025 2178 --force): dev 17/17 passed, release 17/17 passed, 0 skipped. Linux:python3 tests/docs_links_check.pypassed.AI-assisted; commands listed were executed locally.