XGameSave: five fixes, built and tested on Windows (replaces #461) #470
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!470
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-470"
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?
@GiovanniFadanelli on GitHub · 2026-11-27 14:22 UTC · original
GiovanniFadanelli:fixes/saves-tested→main· +166 −14 · 1 files · 5 commits · openReplaces #461 (zocram4cc). The same five commits, unchanged, with their original authors (EatCodeSleep2, quaternion, DocBlack89, Duff, towiice): validate a save's blob count before reading it, refuse a second change of one blob in an update, keep a quota excess across replacements, null the handle on a failed create, and abort the legacy container migration when a blob read fails.
Testing (Windows 11, RX 9070 XT, native MSVC 1.98.1; base
126acb35vs this head)cargo check(gpu, hle, loader, shader, victory,--all-targets): rc 0 at base and head.--test-threads 1): 155 / 0 / 2 ign at base, 158 / 0 / 2 ign at head. The three new GDK tests run and pass (a_failed_create_leaves_a_null_handle,migration_aborts_without_deleting_old_when_a_blob_cannot_be_read,replacements_do_not_hide_an_existing_quota_excess).saves_persist_across_providers.xgamesave.rs).Not verified in game. AI-assisted testing; the code is the original authors'.
🤖 Generated with Claude Code
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.@UwUCammie on GitHub · 2026-11-27 14:40 UTC · original
I reproduced this on
linux-wine-prunder Wine 11.22 using the temporary-container test. The original was removed on the old code. With your patch it was kept, no version was committed, and retrying after repair recovered both blobs. I’ve carried the same patch over in borntofrag34/VIctory-7900XTX#13.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.