runtime: handle save name allocation failures #2701
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2709"
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 louisdibiasi on 2026-11-26T03:02:01Z.
Change
Follow-up to #2697. An allocation failure while copying a long container name in
update_containerreturnsE_OUTOFMEMORYthrough the save-action handler, but leaves its shared save lock held. Release the lock on that exception so later operations can proceed.valid_nameis alsonoexceptyet allocates when a name has a long stem; an allocation failure there terminates the process. Compare the reserved device-name stem through astring_viewinstead, preserving the existing validation rules without an allocation.The source-built fixture injects failure into the container-name copy, checks the error and takes the lock exclusively without blocking, then retries the update. It also verifies validation of a long name without allocating. On the merged #2697 code, the lock check failed (fixture exit 24); the old allocating validator terminated the isolated child (exit 3). Existing tests cover accepted and rejected names, including reserved device names and the length limit. No application occurrence is claimed.
Verification
Windows x64, MSVC 19.44; head
c4b3be58:cmake --build --preset dev --target startup_gamesave_submit startup_gamesave_persistandctest --preset dev --no-tests=error -R '^startup_gamesave_(submit_|persist)' --output-on-failure: 3 passed.--preset release: 3 passed before the unrelated upstream merge; the affected files did not change in that merge.cmake --build --preset prandctest --preset pr --no-tests=error: 34 passed, 4 MinLOD capability skips.git diff --check upstream/main...HEAD: clean.The first PR build attempt on upstream
ed53c1fefailed in unrelated duplicate D3D12 member declarations; the rerun above includes the merged upstream repair #2706.AI-assisted (Codex). Synthetic fixtures only.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T03:18:35Z.
Review: APPROVED
Verified from this head with MSVC Debug and /O2, using both the synthetic scheduler and the system Immediate queue (4/4). The long-name allocation injection returns E_OUTOFMEMORY, an exclusive lock is immediately available, and retrying the same update writes the data. The reserved-name stem comparison keeps its ASCII folding and space trimming without allocating.