Repository navigation
runtime: handle save name allocation failures - #2709
Merged
Merged
Conversation
R0Y00
approved these changes
Nov 26, 2026
R0Y00
left a comment
Owner
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 c4b3be5:
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 ed53c1f failed in unrelated duplicate D3D12 member declarations; the rerun above includes the merged upstream repair #2706.
AI-assisted (Codex). Synthetic fixtures only.