Repository navigation
Conversation
The public SDK's libkernel, libkernel_sys and libkernel_web stub tables declare _sigintr, the sigset_t that FreeBSD's libc shares between signal and siginterrupt, and no built library provided it (boykopovar#8846). libkernel now exports the 16-byte object, zero at start, and signal records a handler with SA_RESTART unless its signal is in the set, as lib/libc/gen/signal.c does. siginterrupt, which fills the set, is a libSceLibcInternal export; libc does not link libkernel and cannot reach the dispositions, so it stays out and a debt entry for signal says so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gisters siginterrupt is a libSceLibcInternal export (the public SDK's stub table has it there, not in the kernel tables) and FreeBSD 11.4's lib/libc/gen/siginterrupt.c reads the signal's disposition, sets or clears the signal's bit in _sigintr and SA_RESTART, and installs the disposition again. libc cannot call libkernel, so, as the pthread hooks do, libc keeps a registered sigaction and the address of the _sigintr set, and libkernel registers both from a static initializer when it loads. A call before that throws; the set is written without libkernel's registration lock, as FreeBSD's libc does. Builds on boykopovar#8866, which adds the set. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@Queuse a merge-order note: this PR carries #8866's and #8872's commits, and #9499 changes |
|
@EagleBearerYS That order works for me: #8866 → #9499 → #8872 → this PR. I've added #9499 to the dependencies here. Once it lands, I'll rebase, keep |
What
Adds a focused siginterrupt regression covering every signal-set word boundary, negative and extreme nonzero flags, repeated calls, successful errno preservation, unchanged neighboring bits, preservation of the installed handler/mask/other flags, later signal registrations, and invalid signal numbers with nonzero state sentinels. Compile-time checks cover the guest signal-set and sigaction layouts.
Stacks on #8872, which carries #8866; their implementations and authorship are retained. This contribution adds only the behavioral test and CMake registration. It does not change host-I/O interruption behavior.
Tested
Windows x86-64, WinLibs MinGW-w64 GCC 15.2.0, Release, full library build configuration, based on main 27c88a8 plus #8872/#8866.
Required overlap scan completed. The #8866/#8872 overlap is the declared implementation stack; remaining source/debt matches belong to that stack or unrelated entries. Manual review of incomplete comparisons found no duplicate of the new regression. Current overlap review against main
a6dcea9279: #9123 appends pending-signal tests at the same end ofGuestSignals.cpp; both blocks must be preserved in either merge order. Its pending-signal behavior is independent of this test. #7622 overlaps the include insertion inProcess.cpp, and the remaining confirmed matches edit other libc debt entries. #6044 reorganizes test registration and would require adapting this registration if it lands first. The carried production implementations still match #8866/#8872. Integration into the consulted main is clean; tests above remain on their stated base.Merge order: #8866 → #9499 → #8872 → #9001, following the proposal in the merge-order comment. #9499 is still open. A trial merge of this head (
630daf82ec) with #9499 (56b2a6393f) confirms conflicts inSignals.cppanddocs/dev/debt/libkernel.md. When rebasing after #9499 lands, preserveSettleReset(guest)together with the_sigintr-dependent flags insignal_nid_postfix, both load-time registrations (RegisterSigaction_nid_no_patchandGuestSigprocmaskRegister_nid_no_patch), and both applicable debt entries. The combined code has not been built or tested; rerun the focused signal tests after that rebase.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)