13 Commits
Author SHA1 Message Date
valenciana-nc 3eee6be59d test(savedata): update journal and Windows failure cases for exclusive staging 2026-10-19 06:33:14 -06:00
ABEL VALENCIANA 32b268fe0f fix(savedata): create exclusive temporary files for save replacement 2026-10-19 06:33:13 -06:00
Nithishvelan M 738eff083c fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory 2026-10-18 09:42:13 +05:30
Nithishvelan M 87f2e7a88c fix(libSceSaveData.native): drop size 0 and resource validation per review 2026-10-18 01:05:22 +05:30
Nithishvelan M c43c931005 fix(libSceSaveData.native): validate initialization and parameters in transaction resource lifecycle 2026-10-18 00:19:48 +05:30
Muhammad Wasif Ali WasifandClaude Opus 5.5 0c06a28ac5 fix(savedata): read every sceSaveDataSetSaveDataMemory2 data entry at its 64-byte stride
SaveDataMemoryData was declared as 24 bytes, so libSceSaveData.native read the second and later entries of a guest data array from the reserved bytes of the first one, saw a zero size and skipped them while returning OK. The entry is 64 bytes (buffer, size, offset, 40 reserved), as SaveDataCore.hpp already asserted for its own copy of the struct and shadPS4 declares.

With the shared type the right size, SaveDataCore.hpp drops its private MemoryData and the casts to it and uses SaveDataMemoryData. Its range check takes the unsigned offset; a negative guest offset is still rejected because it exceeds any memory size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:00:34 +05:00
emirplus 6a7cce415a fix(savedata): recover from metadata setup failure 2026-10-10 21:09:00 +03:00
emirplus a8c2100f59 fix(savedata): ensure metadata precedes blob commit and handle rollback recovery
Write initial SaveDataParam metadata before replacing the memory blob so metadata failure cannot leave a prematurely grown blob. Handle blob write failure with metadata rollback, and allow retries to recover slots with missing metadata. Expand tests with nonzero data, blob failure, and fresh readback.
2026-10-08 21:41:09 +03:00
emirplus c4c3ed7711 fix(savedata): recover from metadata setup failure
Report SAVE_DATA_ERROR_INTERNAL when setupSaveDataMemory2 fails to persist initial SaveDataParam metadata, and restore previous state so retrying setup can initialize cleanly. Closes #1667.
2026-10-08 19:18:36 +03:00
Sanjaysrinivas c4cfb8e23d fix(savedata): preserve memory on write failure 2026-10-07 21:40:33 +02:00
MerijnandClaude Opus 5.5 d1d98a8261 fix(savedata): accept a repeated sceSaveDataInitialize3
A second sceSaveDataInitialize3 returned SAVE_DATA_ERROR_ALREADY_INITIALIZED.
PPSA12544's executable and its Unity SaveData plugin both initialize, and
the plugin raises Unity.SaveData.PS5.Core.SaveDataException on any error,
so the console must accept the second call. Initializations are now
counted; sceSaveDataTerminate ends the session at the last one and only
then checks for mounted slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 10:46:48 +02:00
RomainROCH 1a55adfee2 chore(savedata): sync metadata fix with main 2026-10-03 00:09:01 +02:00
RomainROCH 193ec6e268 fix(savedata): report memory metadata write failures 2026-10-02 06:05:54 +02:00