XGameSave: five fixes that apply cleanly to main #461

Open
github-bot wants to merge 5 commits from github-bot/gh-461 into main AGit
Owner

@⁠zocram4cc on GitHub · 2026-11-27 12:37 UTC · original
zocram4cc:up/pr-fixes-saves → main · +166 −14 · 1 files · 5 commits · open

Five XGameSave fixes cherry-picked from a third-party Proton/RADV port (zocram4cc/victory-linux-perf, main) onto 126acb35. They apply cleanly; original authors and commit messages kept.

What they are:

  • 8f0effb5 EatCodeSleep2 — validate the blob count a save reports before reading it
  • d6fc4dd1 quaternion — refuse a second write/delete of one blob in an update (the console allows one change per blob; the last one used to win silently)
  • 85965ecb DocBlack89 — keep existing quota excess when replacing blobs (AI-assisted, says its own message)
  • 6d3e393a Duff — a failed XGameSaveCreateContainer/CreateUpdate/InitializeProviderResult now nulls the handle, as the GDK documents (before: the title closed whatever was on its stack)
  • 77f421c5 towiice — abort the legacy container migration if any blob read fails

Provenance: curated from the RYUKI-7900XT / LibsMQG hle-d3d12-7900xtx fork line and contributor PRs; none of the five is in main or in any open PR I could find (checked the open list, incl. the Marvisak storage-safety PR, against each commit).

Testing — honest: applies cleanly to main commit by commit; NOT compiled or run by the submitter (Linux, no Windows target, no game runs here), so CI is the gate. No environment variables, no default changes.

AI-assisted selection/verification (cherry-pick dry-run, attribution, redundancy check); all code is the original authors'.

**@⁠zocram4cc** on GitHub · 2026-11-27 12:37 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/461) `zocram4cc:up/pr-fixes-saves` → `main` · +166 −14 · 1 files · 5 commits · open Five XGameSave fixes cherry-picked from a third-party Proton/RADV port (zocram4cc/victory-linux-perf, `main`) onto `126acb35`. They apply cleanly; original authors and commit messages kept. **What they are:** - `8f0effb5` EatCodeSleep2 — validate the blob count a save reports before reading it - `d6fc4dd1` quaternion — refuse a second write/delete of one blob in an update (the console allows one change per blob; the last one used to win silently) - `85965ecb` DocBlack89 — keep existing quota excess when replacing blobs (AI-assisted, says its own message) - `6d3e393a` Duff — a failed `XGameSaveCreateContainer`/`CreateUpdate`/`InitializeProviderResult` now nulls the handle, as the GDK documents (before: the title closed whatever was on its stack) - `77f421c5` towiice — abort the legacy container migration if any blob read fails **Provenance:** curated from the RYUKI-7900XT / LibsMQG hle-d3d12-7900xtx fork line and contributor PRs; none of the five is in `main` or in any open PR I could find (checked the open list, incl. the Marvisak storage-safety PR, against each commit). **Testing — honest:** applies cleanly to `main` commit by commit; NOT compiled or run by the submitter (Linux, no Windows target, no game runs here), so CI is the gate. No environment variables, no default changes. AI-assisted selection/verification (cherry-pick dry-run, attribution, redundancy check); all code is the original authors'.
XGameSave permits only one write or delete per blob in an update. WriteBlob and DeleteBlob accepted repeats and submit silently kept the last one, so a title could pass locally but fail on a console. Refuse a second change to a blob already in the update, update the existing test that relied on write-then-delete, and keep the first change.
Keep existing quota excess in the accounting when replacing blobs. Cover quota recovery boundaries, deletions and disk-space errors with a pure regression. AI-assisted.
XGameSaveCreateContainer, XGameSaveCreateUpdate and
XGameSaveInitializeProviderResult left the title's handle untouched when
they failed. The GDK documents those handles as null on failure, and
its own sample closes them on that basis ("if (containerContext)
XGameSaveCloseContainer(...)" on a variable it never initialized), so
a failed call made the title close whatever was on its stack: a heap
corruption far from the failure that caused it.

Each of the three now nulls the handle before anything can fail.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 12:45:06 +00:00
Author
Owner

@⁠GiovanniFadanelli on GitHub · 2026-11-27 14:24 UTC · original

Superseded by #470: the same five commits, built and tested on Windows (each test red-first). Results are in that PR.

**@⁠GiovanniFadanelli** on GitHub · 2026-11-27 14:24 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/461#issuecomment-7220751350) Superseded by #470: the same five commits, built and tested on Windows (each test red-first). Results are in that PR.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/461/head:github-bot/gh-461'
git switch 'github-bot/gh-461'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-461'
git switch 'github-bot/gh-461'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-461'
git switch 'github-bot/gh-461'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-461'
git switch 'main'
git merge --squash 'github-bot/gh-461'
git switch 'main'
git merge --ff-only 'github-bot/gh-461'
git switch 'main'
git merge 'github-bot/gh-461'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.