refactor(camera): drop errno saves around guest copies #26189
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/26189"
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:27Z.
What
Same change as #25937, #25944 and #25945, for
libSceCamera.GuestCopyIn_nid_no_patch,GuestCopyOut_nid_no_patchandGuestWritable_nid_no_patchrestoreerrnothemselves since #21243 (RestoreErrnoinlibc/src/General.cpp), so saving and restoringerrnoaround them does nothing.12 inline saves around a guest copy are removed, in
Export.cpp,Attributes.cpp,Config.cpp,Device.cppandHandles.cpp. A save is kept where the saved value is used again later in the function. 26 lines removed and 1 added.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 'camera', with its 3 build outputs fromtools/select_tests.py targets: 3 of 3 onmain709342e209and 3 of 3 with this change applied to it.tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlap with the 2549 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:43:51Z.
Review: APPROVED
I ran an independent native Windows GCC 15.2 A/B test of all five changed camera sources on
709342e209and27662ec589. Both revisions passed 18 export calls with 14 read-hook and 5 write-hook calls. The hooks deliberately changed errno, and the caller's value survived each copy. The audio probe rejected unreadable memory after the read hook, and the config getter accepted a valid size from read-only memory then rejected the write without altering the config. The device and frame queries also kept their before-open/after-close return values. The fixture needed no camera hardware.The merge with #25691's camera-index change is clean. The Windows CI log shows one passing test, patched_libraries. The focused hook fixture was a separate run.
AI-assisted: yes