refactor(systemservice): drop errno saves around guest copies #26191
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26191"
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 boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-23T12:28:39Z.
What
Same change as #25937, #25944 and #25945, for
libSceSystemService.GuestCopyIn_nid_no_patch,GuestCopyOut_nid_no_patchandGuestWritable_nid_no_patchrestoreerrnothemselves since #21243 (RestoreErrnoinlibc/src/General.cpp), so saving and restoringerrnoaround them does nothing.20 inline saves around a guest copy are removed, in
Export.cppandPendingExports.cpp. A save is kept where the saved value is used again later in the function. 40 lines removed.No open pull request touches these files.
No change in behaviour.
Tested
Windows 11 (10.0.26300), WinLibs GCC 15.2.0 r7, Release.
ctest -R 'system_?service', with its 20 build outputs fromtools/select_tests.py targets: 27 of 27 onmain709342e209and 27 of 27 with this change applied to it.tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlap with the 2550 open pull requests.Not run: Linux and macOS.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T12:49:19Z.
Review: APPROVED
Reviewed
2f0a253b22. All 20 removals surround unchanged checked-copy expressions, and the shared RestoreErrno implementation is identical to the base.A focused native Windows fixture passed 57/57 on the base and on this head. Per arm, the registered errno-changing hooks ran 21 times for reads and 42 times for writes. It covered the two ordered activation outputs, the PS Button read-to-write path, short-circuiting on failure, and preservation of the errno value left by the application category lookup before the copy. With the shared RestoreErrno guards removed in a local negative control, 45 cases failed. The fixture uses the extracted export and checked-copy paths, real Windows page permissions, and test doubles for title metadata and mapping ownership.
I also found open PRs that edit other hunks in the same files (#20896, #14202, #24962, #17144, #8651 and #17090). None changes these save/restore sites or introduces a conflict in these files in a merge-tree check against this PR.
AI-assisted: yes