feat(libc): implement legacy signal masks #10392
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10392"
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 GabrielKLBr on 2026-10-23T20:55:52Z.
What
Adds
sigblock(Bm3k7JQMN5w) andsigsetmask(cJvOg1KV8uc) to libSceLibcInternal. Missing imports can resolve to implementations that block or replace the guest signal mask through libkernel's existingsigprocmask.Both take a signed 32-bit mask, zero-fill the upper words of the 128-bit guest signal set, and return the signed low word of the previous mask. Backend failures and errno pass through unchanged. The semantics follow FreeBSD 11.4
lib/libc/compat-43/sigcompat.c; console verification and inherited libkernel limitations are recorded in the existing debt file.The two new behavioral tests cover every combination of seven input and previous masks, signed bit 31, zero-extension, backend errors, errno preservation, unmaskable signals, upper-word preservation or clearing, and pending-signal delivery. The workflow used for validation lives only on a separate fork branch and is excluded from this PR.
tools/pr_overlap.py --branch feat/libc-legacy-signal-masksreports no line or export overlaps. It cannot compare the base-conflicted shared files of #5021, #6044, #9133 and #9669. Those patches were reviewed manually: they change Darwin statvfs/TLS tests, reorganize test paths, or change spawn linkage and debt; none implements these exports or edits this implementation.Tested
Draft: complete build validation is still in progress. Source commit
1cc37db1af3f671132ad6927cc629e7f6ffda01c, based on main1915df0dd430e678b4a2348e3454c0f306f5c7df: https://github.com/GabrielKLBr/AnyPS5/actions/runs/40021748777Edit: The build was successfully validated.
At PR creation, the focused target build, the four signal behavior/regression tests, conventions and test registration have passed on the Windows runner. The complete project build is running. The subsequent explicit
libsbuild andpatched_librariestest have not run yet. This is not a claim of complete build or test-suite success. Onlysigblockandsigsetmaskare added; the nine todo entries reported for the separate libc module are not resolved by this PR.Windows x86-64 (
windows-2025), WinLibs GCC 15.2.0 UCRT POSIX SEH r7, Ninja, CMake Release,BUILD_TESTING=ON. The validation workflow runs the following commands, with the pending stages identified above:The local Windows 10 Education 22H2 machine builds the focused targets and passes the standalone forwarding test, but its Core i3-2120 lacks the CPU features required by libkernel's startup guard. The new integration test and unchanged main's existing
guest_signalsboth stop at that guard before main. The Windows runner is used for runtime validation without bypassing that check. No PS5, game, homebrew or Linux runtime testing was performed. The complete CTest suite was not run.Full Linux and Windows checks in the official repository require a collaborator with write access to start the Build workflow, as CONTRIBUTING.md describes. The fork validation above does not substitute for those official checks.
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 MarcZX10 on 2026-10-23T21:19:10Z.
Review: APPROVED
Reviewed the implementation, tests, CMake registration, and debt update. The wrappers translate the legacy operations to
SIG_BLOCK/SIG_SETMASK, zero-extend the signed 32-bit mask to the 128-bit guest set, and return the signed previous low word. The tests cover forwarding/error propagation and guest integration, including unmaskable signals and pending delivery. Hosted conventions, intake and labels pass; the linked Windows validation run has passed the focused build/tests and is still compiling the full project, so I am not treating that full build or the laterlibs/patched_librarieschecks as complete.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T00:34:12Z.
Review: APPROVED
Re-reviewed head
1cc37db1af3f671132ad6927cc629e7f6ffda01cwith the completed validation run40021748777. The Windows job now passes the focused signal behavior/regression tests, full project build, productionlibsbuild, patched-library load test, conventions and test registration. This resolves the validation caveat in my earlier review. The implementation and test diff remain unchanged; I found no additional issue.