Repository navigation
refactor(libkernel): drop more errno saves around guest copies - #26202
Merged
oneandonlydean merged 1 commit intoNov 23, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #26010, for the rest of
libkernelthat no open pull request touches.GuestCopyIn_nid_no_patch,GuestCopyOut_nid_no_patchandGuestWritable_nid_no_patchrestoreerrnothemselves since #21243 (RestoreErrnoinlibc/src/General.cpp), so saving and restoringerrnoaround them does nothing.5 inline saves around a guest copy are removed, in
DirectMemory/MemoryPoolExport.cpp,Pthread/src/Tsd.cppandSystem/src/SoftwareVersion.cpp. A save is kept where the saved value is used again later in the function. 10 lines removed.Four files with such saves are left out because open pull requests touch them:
DirectMemory/Export.cpp: fix(libkernel): validate guest destination pointers upfront in sceKernelBatchMap2 and sceKernelStopUnloadModule #25960 changes the same lines, and fix(libkernel): bound virtual range names as the console does #21569 also touches it.EventFlag/src/EventFlag.cpp: fix(libkernel): read and write the event flag and mutex init pointers through checked copies #22055 changes the same lines.Equeue/Equeue.cpp: feat(libkernel): implement the named ksem semaphores #9293, feat(libkernel_sys): implement POSIX message queues #9297 and feat(libkernel_sys): implement kmq_notify registration #9302.Module/src/Module.cpp: fix(libkernel): provide default arguments block for DT_INIT on Linux #6149.No change in behaviour.
Tested
Windows 11 (10.0.26300), WinLibs GCC 15.2.0 r7, Release.
ctest -R 'kernel', with its 116 build outputs fromtools/select_tests.py targets: 147 of 147 onmainb16988fb8band 147 of 147 with this change applied to it.tools/check_conventions.pypasses.tools/pr_overlap.py --branchfinds no overlap with the 2554 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)