Skip to content

refactor(libSceLibcInternal): serve siginterrupt from libSceLibcInternal - #10749

Merged
oneandonlydean merged 14 commits into
boykopovar:mainfrom
ycbuzi:refactor/siginterrupt-libc-internal
Nov 4, 2026
Merged

oneandonlydean merged 14 commits into
boykopovar:mainfrom
ycbuzi:refactor/siginterrupt-libc-internal

Conversation

@ycbuzi

@ycbuzi ycbuzi commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Follow-up to #8872, as suggested by @harisibrar1 in its review: siginterrupt (TsrS8nGDQok) moves from libc to libSceLibcInternal/SignalList.cpp. On the console it is a libSceLibcInternal.sprx function (STT_FUNC, 128 bytes, absent from the kernel modules) that imports _sigintr and UDCI-WazohQ, which hashes from _sigaction (@mazen320's dynsym parse and Ghidra decompile on #8872, and the NID check there).

libSceLibcInternal links libkernel and already calls libkernel exports directly (utimes in FileTime.cpp, fcntl and close in Directory.cpp). So siginterrupt now calls _sigaction_nid_postfix (UDCI-WazohQ, the import the console function uses; on main it forwards to sigaction_nid_postfix, Signals.cpp:513-514) and sets or clears its bit in _sigintr_nid_postfix itself. The sequence is unchanged: FreeBSD 11.4 lib/libc/gen/siginterrupt.c. Read the disposition, set or clear the bit with SA_RESTART cleared or set, then install it again. EINVAL for a signal outside 1 to 128 comes from the first _sigaction, before the set is touched.

This removes what #8872 needed while siginterrupt lived in libc:

  • SigactionFn_nid_no_patch and RegisterSigaction_nid_no_patch in libc's General.hpp;
  • the registration block and its copy of the sigaction struct in libc's Process.cpp, including the throw for a call before registration;
  • the static initializer at the end of libkernel's Signals.cpp that registered sigaction.

On main the relinker gives a module that imports libSceLibcInternal both libSceLibcInternal.prx and libc.prx (GuestModuleBuilder.cpp:368-371), so a title's siginterrupt import now resolves in libSceLibcInternal.prx. With #10706's export headers, SignalList.cpp takes GuestSigaction and _sigaction_nid_postfix from libkernel/include/Api.hpp, and the siginterrupt_nid_postfix declaration moves from libc/include/Api.hpp to libSceLibcInternal/include/Api.hpp, so public_headers still finds one declaration per export. guest_signal_tests links libSceLibcInternal and GuestSignals.cpp includes its header for the existing siginterrupt checks. The debt entry moves from libc.md to libSceLibcInternal.md.

#9001 (@Queuse, test only) merged first, as @oneandonlydean asked on this PR. Its guest_signal_interrupt_tests linked libkernel libc and took siginterrupt_nid_postfix from libc's Api.hpp. With this PR it links libSceLibcInternal too (target_link_libraries(guest_signal_interrupt_tests PRIVATE libkernel libSceLibcInternal libc)), and GuestSignalInterrupt.cpp includes prx/libSceLibcInternal/include/Api.hpp next to its libc include. Those two lines are in 29c52418f2, after merging main.

Overlap: #9499 (@EagleBearerYS) touches the same spots without changing what it does. In Signals.cpp its RegisteredForJumps registration goes in the anonymous namespace whose RegisterSignalsOnLoad this PR removes, and in libkernel.md its sigaction entry sits next to the signal entry changed here. #9499 merged first after all; merging main here keeps its RegisteredForJumps registration in that namespace and drops RegisterSignalsOnLoad, and keeps its sigaction entry next to this PR's signal entry. #10706 and #9001 landed first; main is merged in with the header moves and the two lines above. #10615 and #10648 only touch the neighbouring lines of libc.md.

Tested

Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0, Release, head 68a0d205c0 (main 809c7fa2df merged in): 24 focused tests (the libSceLibcInternal tests, the signal tests, guest_user_context and guest_user_context_exit) and public_headers (65 tests) pass 2 of 2; tools/check_conventions.py passes.

Windows 11 Home 10.0.26200, WinLibs MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release. Head 1c060e99b9 (main efd368fec6, with #9001, #10706 and #9499, merged in):

  • Built libkernel, libc, libSceLibcInternal and the test executables with no errors. The one warning is main's existing _sigintr_nid_postfix "initialized and declared 'extern'" at Signals.cpp:24.
  • ctest --repeat until-fail:2: guest_signal_interrupt (test(libc): cover siginterrupt state boundaries #9001's test), guest_signal_handler_mask (fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND #9499's), guest_signal_sets, guest_signals, the 17 libSceLibcInternal tests and guest_user_context (22 tests) pass both runs.
  • public_headers and its 64 compile batches (65 tests) pass.
  • tools/check_conventions.py --base origin/main passes.
  • Export tables (objdump -p): only libSceLibcInternal.prx exports siginterrupt_nid_postfix; libkernel.prx exports _sigaction_nid_postfix and _sigintr_nid_postfix; libc.prx has none of them.
  • After merging main 88795ed448 (head 432aed7b7b, 0 behind): the same 22 tests pass 2 of 2, public_headers (65 tests) passes, tools/check_conventions.py --base origin/main passes and the export tables are the same. The only warning is still main's _sigintr_nid_postfix one, now at Signals.cpp:26.
  • After merging main e0cd1259a9 (head 32c682c803, 0 behind; the one conflict was the neighbouring collate<char> vtable entry in docs/dev/debt/libc.md, kept as main has it): the same 22 tests pass 2 of 2, the 64 public_headers_compile_* batches pass, tools/check_conventions.py --base origin/main passes and the export tables are the same. The public_headers audit passes (368 libraries, 12811 exports) run directly, but took 120 s on this machine against the test's 90 s timeout while another build ran, so under ctest it timed out.
  • After merging main 420b6a064e (head f430c9ec4e, 0 behind; the one conflict was feat(libc): throw std::filesystem::filesystem_error from _Xfilesystem_error as the console's libc does #11504's removal of the _Xfilesystem_error entry next to this one in docs/dev/debt/libSceLibcInternal.md, kept as main has it): the same 22 tests pass 2 of 2, public_headers (65 tests) passes, tools/check_conventions.py --base origin/main passes and the export tables are the same. The only warning is still main's _sigintr_nid_postfix one, now at Signals.cpp:30.

Before #9001 merged, on main 2dc85609fc: its GuestSignalInterrupt.cpp at b5e40d1d3e (all four set words, extreme flags, errno, neighbouring bits, the signal interplay, invalid signals) passed both runs on this branch with libSceLibcInternal added to its link line, and linked as libkernel libc it failed with undefined references. libSceLibcInternal.prx imports _sigaction_nid_postfix and _sigintr_nid_postfix from libkernel.prx.

Not tested: Linux, macOS, a title.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none (test(libc): cover siginterrupt state boundaries #9001 has merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

siginterrupt is a libSceLibcInternal function that imports _sigaction on the
console. libSceLibcInternal links libkernel, so it can call _sigaction and
write the _sigintr set directly; the sigaction registration libc needed, its
static initializer in Signals.cpp and the throw for a call before
registration go away.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Progress report (1e65852 → 24497b2)

➖ System libraries: 26.65% (+0.0%, +1 implemented, -1 removed functions)

✅ 1 implemented
Library Name
libSceLibcInternal siginterrupt_nid_postfix
🗑️ 1 removed
Library Name
libc siginterrupt_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libc 1613/1632 (98.84%) 1612/1631 (98.84%) -0.0007%
libSceLibcInternal 84/989 (8.49%) 85/990 (8.59%) +0.09%

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the relocation and the reported Windows coverage. The console evidence and the sequence match the stated FreeBSD implementation; the layout assertions and use of _sigaction before indexing the signal set are useful safeguards. I have not run the PR's Windows tests locally; the focused Windows results in Tested are author-reported, and hosted product jobs are currently skipped.

There are two unresolved integration points that affect the build/test result:

  1. The open #9001 test currently links only libkernel and libc. Once this PR removes siginterrupt from libc, that test cannot link until its target also links libSceLibcInternal. The PR description notes this, but there is no confirmed order with #9001's author, and the checklist still says Depends on: none. Please coordinate the target-link change with that author and record the agreed order/dependency in both PR descriptions.
  2. I ran git merge-tree on the current heads of this PR and #9499. The combined result has content conflicts in core/libs/prx/libkernel/System/src/Signals.cpp and docs/dev/debt/libkernel.md. The described resolution appears possible (retain RegisteredForJumps, omit the obsolete sigaction-registration initializer, and retain both debt updates), but the heads do not merge as-is. Please confirm the order/resolution with #9499's author and record it in the checklist before this can be approved.

The implementation may be correct independently, but the known open test and code conflicts need an agreed integration path. The relinker/product matrix is still running, so I will recheck it after these coordination points are resolved.

@EagleBearerYS

Copy link
Copy Markdown
Contributor

@ycbuzi #9499 (a signal blocked while its handler runs, and SA_RESETHAND) touches the same two spots as this PR:

They compose. #9499 goes after this PR (merge order only) and keeps both sides when it merges main, so nothing changes here.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@ycbuzi heads-up: #9001 adds a siginterrupt test target, guest_signal_interrupt_tests in core/libs/prx/libkernel/CMakeLists.txt, which links only libkernel and libc. It's reviewed and green, and it will merge before this PR. Once it's on main, please add libSceLibcInternal to that test target's link libraries here, and add Depends on: #9001 to the description.

@ycbuzi

ycbuzi commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean will do: once #9001 is on main, I'll merge it into this branch, add libSceLibcInternal to guest_signal_interrupt_tests, and rerun it. Its test at b5e40d1d3e already passes on this branch with that change. Depends on: #9001 is in the description now.

@EagleBearerYS thanks, that order works: #9499 goes after this one, keeping RegisteredForJumps and both debt entries. If #9499 does land first, I'll merge main here the same way.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 10397 core/libs/prx/libc/include/Api.hpp L1683
PR 15711 docs/dev/debt/libSceLibcInternal.md L330

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.

Pull request Shared files not compared
PR 3986 core/libs/prx/libkernel/System/src/Signals.cpp
core/libs/tests/GuestSignals.cpp
PR 4563 core/libs/prx/libkernel/CMakeLists.txt
PR 4630 docs/dev/debt/libkernel.md
PR 5021 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libSceLibcInternal.md
docs/dev/debt/libc.md
docs/dev/debt/libkernel.md
PR 5303 docs/dev/debt/libc.md
PR 6149 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 6819 docs/dev/debt/libc.md
PR 6936 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 7081 docs/dev/debt/libc.md
PR 7088 docs/dev/debt/libkernel.md
PR 7105 docs/dev/debt/libkernel.md
PR 7121 docs/dev/debt/libkernel.md
PR 7135 docs/dev/debt/libkernel.md
PR 7149 docs/dev/debt/libkernel.md
PR 7386 docs/dev/debt/libc.md
PR 7447 docs/dev/debt/libc.md
docs/dev/debt/libkernel.md
PR 7464 docs/dev/debt/libkernel.md
PR 7622 core/libs/prx/libc/src/Process.cpp
core/libs/prx/libkernel/System/src/Signals.cpp
PR 7715 docs/dev/debt/libc.md
PR 7804 docs/dev/debt/libkernel.md
PR 8150 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9156 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 9293 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 9297 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 9302 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9383 core/libs/prx/libkernel/CMakeLists.txt
PR 9389 core/libs/prx/libkernel/CMakeLists.txt
core/libs/prx/libkernel/System/src/Signals.cpp
docs/dev/debt/libkernel.md
PR 9447 core/libs/prx/libc/include/General.hpp
docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 9557 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 9566 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 10405 docs/dev/debt/libc.md
PR 10442 docs/dev/debt/libkernel.md
PR 10780 core/libs/prx/libc/include/Api.hpp
docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11724 docs/dev/debt/libc.md
PR 11831 core/libs/prx/libc/include/Api.hpp
core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libc.md
PR 11896 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 11939 core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libkernel.md
PR 12849 docs/dev/debt/libc.md
PR 13449 docs/dev/debt/libc.md
PR 13486 core/libs/prx/libSceLibcInternal/SignalList.cpp
core/libs/prx/libSceLibcInternal/include/Api.hpp
core/libs/prx/libc/include/Api.hpp
core/libs/prx/libc/include/General.hpp
core/libs/prx/libc/src/Process.cpp
core/libs/prx/libkernel/CMakeLists.txt
docs/dev/debt/libSceLibcInternal.md
docs/dev/debt/libc.md
docs/dev/debt/libkernel.md
PR 13778 core/libs/prx/libSceLibcInternal/include/Api.hpp
docs/dev/debt/libSceLibcInternal.md
PR 13782 docs/dev/debt/libSceLibcInternal.md
PR 13794 docs/dev/debt/libc.md
PR 13804 docs/dev/debt/libc.md
PR 13809 docs/dev/debt/libc.md
PR 14105 docs/dev/debt/libkernel.md
PR 14128 docs/dev/debt/libkernel.md
PR 14212 docs/dev/debt/libSceLibcInternal.md
docs/dev/debt/libc.md
docs/dev/debt/libkernel.md
PR 14299 core/libs/prx/libkernel/CMakeLists.txt
PR 14401 docs/dev/debt/libSceLibcInternal.md
PR 14832 docs/dev/debt/libkernel.md
PR 14837 core/libs/prx/libSceLibcInternal/include/Api.hpp
docs/dev/debt/libSceLibcInternal.md
PR 14854 docs/dev/debt/libkernel.md
PR 14886 core/libs/prx/libkernel/System/src/Signals.cpp
docs/dev/debt/libkernel.md
PR 14894 docs/dev/debt/libkernel.md
PR 14936 docs/dev/debt/libSceLibcInternal.md

@MarcZX10

Copy link
Copy Markdown
Contributor

I rechecked the current integration point against open #9001. The dependency in the body is now accurate: #9001 remains open and links guest_signal_interrupt_tests only with libkernel libc; this branch moves siginterrupt_nid_postfix into libSceLibcInternal, so the test target will need that library after this change lands. The PR describes the link adjustment, but it is not present in #9001's current head, and git merge-tree shows that #9001's CMake hunk and this PR's guest_signal_tests link change overlap. Please coordinate the link change and merge order with #9001's author (or update the test branch after this lands) so there is a confirmed buildable integration path. I also confirmed the body now records #9499 after this PR; my earlier merge-tree check is consistent with that stated order.

@ycbuzi

ycbuzi commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 the order is settled: @oneandonlydean decided above that #9001 merges first, so #9001 needs no change. The integration path is this branch merging main after #9001 lands and adding libSceLibcInternal to guest_signal_interrupt_tests here, which also resolves the overlapping CMake hunk. I ran #9001's test at b5e40d1d3e on this branch with that link change, and it passes both runs on Windows.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 24, 2026
@MarcZX10

Copy link
Copy Markdown
Contributor

The merge-base advanced: #10706 is now on main at f26434afa36e58778a9ff4b948aea52dff19eb0c, and the current #10749 head is now DIRTY against main. I verified git merge-tree upstream/main refs/anyps5-review/pr10749-current; the content conflict is in core/libs/prx/libSceLibcInternal/SignalList.cpp. The #10706 side includes the canonical libkernel/include/Api.hpp and libSceLibcInternal/include/Api.hpp; this branch still has its local GuestSigaction definition and _sigaction_nid_postfix declaration there. Your description already anticipates using the shared GuestSigaction and _sigaction_nid_postfix declarations from the canonical header after #10706 lands. Please rebase/merge current main, resolve that file to use the shared declarations, keep the siginterrupt implementation in SignalList.cpp, and rerun the signal tests and header/convention checks on the integrated head.

Brings in boykopovar#10706's export headers. SignalList.cpp now takes GuestSigaction
and _sigaction_nid_postfix from libkernel/include/Api.hpp, the
siginterrupt_nid_postfix declaration moves from libc/include/Api.hpp to
libSceLibcInternal/include/Api.hpp, and GuestSignals.cpp includes that
header for its siginterrupt checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@ycbuzi

ycbuzi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 both integration points from your review are settled, and the combined path is now built and tested:

  1. test(libc): cover siginterrupt state boundaries #9001: @oneandonlydean set the order, test(libc): cover siginterrupt state boundaries #9001 first, and the description says Depends on: #9001. I merged this head (ad36ce7766), current main (a5a780eaaa) and test(libc): cover siginterrupt state boundaries #9001's current head (48c595d09d) locally. They merge with no conflicts. Since refactor(libs): add full export headers for libs #10706, test(libc): cover siginterrupt state boundaries #9001's test needs two lines on top of this PR: libSceLibcInternal in guest_signal_interrupt_tests's link libraries, and #include "prx/libSceLibcInternal/include/Api.hpp" in GuestSignalInterrupt.cpp. With both, on Windows 11 / WinLibs GCC 15.2.0 r7, guest_signal_interrupt, guest_signals, the 17 LibcInternal tests and guest_user_context pass both runs of --repeat until-fail:2, public_headers passes 65 of 65, and check_conventions.py --base origin/main passes. I'll push exactly those two lines here once test(libc): cover siginterrupt state boundaries #9001 is on main.
  2. fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND #9499: @EagleBearerYS agreed it goes after this PR (comment above) and keeps RegisteredForJumps and both debt entries when it merges main. That's recorded in the description.

Could you take another look when you have a moment? AI-assisted: yes (Claude Code)

@AZLisme

AZLisme commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

@ycbuzi Following the integration review on #10953, I moved its sigvec registration into a separate kernel source/CMake entry and restored Signals.cpp exactly to base 401731067856. This keeps your removal/relocation of the old siginterrupt registration independent.

The updated #10953 head 9a8104e0296bf7d7f882b99f5749744557298fe7 merges cleanly with your current ad36ce77663626a65019079ea4aa9ac0fb37a003 (tree 86277d7664243deea0837d58278cb04bee4a0e1f). The actual combined libc, libkernel and libSceLibcInternal build passes, and all 5 focused runtime/header checks pass, exercising both sigvec and your relocated siginterrupt. No merge-order dependency remains for these heads; the details are recorded on #10953. Please flag any planned ownership changes that would affect the new independent registration.

@ycbuzi

ycbuzi commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@AZLisme thanks for checking the combination. No other change is planned here that touches your registration. The only remaining edit to #10749 is the one recorded in the description for after #9001 lands: libSceLibcInternal in guest_signal_interrupt_tests's link libraries and the libSceLibcInternal Api.hpp include in GuestSignalInterrupt.cpp. That edit doesn't touch Signals.cpp or SigvecRegistration.cpp. For completeness, the PR as it stands already removes SigactionFn_nid_no_patch and RegisterSigaction_nid_no_patch from libc's General.hpp, which your combined build at ad36ce7766 already includes, so #10953 doesn't depend on them. AI-assisted: yes (Claude Code)

ycbuzi and others added 2 commits October 25, 2026 08:50
…kopovar#9001 test

boykopovar#9001's guest_signal_interrupt_tests links libkernel and libc and includes
libc's Api.hpp. With siginterrupt served from libSceLibcInternal, the test
links libSceLibcInternal and includes its Api.hpp for the declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ycbuzi

ycbuzi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

#9001 has merged, so main (636a9c1eec) is merged in, and 29c52418f2 adds the two lines its test needs with this PR. Those are libSceLibcInternal on guest_signal_interrupt_tests's link line, and the libSceLibcInternal Api.hpp include in GuestSignalInterrupt.cpp.

On Windows the following pass on this head: guest_signal_interrupt plus the 19 tests from before (both runs of --repeat until-fail:2), public_headers (65 of 65) and check_conventions.py. The Tested section has the details, and "Depends on" now reads none.

@MarcZX10, this is ready for another look whenever you have time.

AI-assisted: yes (Claude Code)

@Queuse

Queuse commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Thanks, I checked ec26e215f1: guest_signal_interrupt_tests now links libSceLibcInternal, and the fixture includes its canonical Api.hpp. With #9001 in main, that closes the test integration point on my side.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head 32c682c803c4a11bd4d137c95f77e2e723f9911b against current main f99d7fece316e31878f0195f8bbc2ad2fbe635e4.

The earlier overlap items are resolved: #9001 and #9499 are merged, and #11504 now declares Depends on: #10749. The current-main merge preview is clean; git diff --check and tools/check_conventions.py pass against current main. I found no new issue in the relocation itself.

I cannot clear the review yet because the tested tree is still based on e0cd1259a9, while current main has moved substantially and changed the related libkernel/System/src/Signals.cpp initialization and signal-debt entries. Please sync this branch to current main and rerun the focused signal tests, public-header/export checks, and conventions on that integrated head. The current hosted Windows relinker matrix also has one red shader_cache_native_paths timeout (368/369 passed); it is unrelated by path, but remains a failed check. Please obtain a green rerun on the updated head.

The author-reported Windows/macOS results on the prior integrated heads are useful, but I did not run a local product build or tests. Product Linux CI is skipped. My existing changes-requested review remains for current-main validation and the failed hosted check.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@ycbuzi

ycbuzi commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Correction: please disregard the report that was here. It was written by my local assistant and it was wrong: it described a different function (sceHttp2SetSslCallback), and no tests ran at all, because merging this branch onto current main stopped at a conflict in docs/dev/debt/libSceLibcInternal.md before anything was built. Sorry for the noise, @MarcZX10.

I'm syncing the branch with current main now and will post a real rerun of the focused signal tests and checks on the new head below.

AI-assisted: yes (Claude Code)

@MarcZX10

Copy link
Copy Markdown
Contributor

Re-checked — test report is unrelated to this PR

The October 29 report says it tested sceHttp2SetSslCallback, which is not part of this siginterrupt PR, so those Windows results do not verify this change.

The current head is still 32c682c803c4a11bd4d137c95f77e2e723f9911b, based on e0cd1259a95e6dfaf97f8f73e74410bbc5d8d199; current main has advanced to 5dc9aa339bb435c8c98bfcaa93046e8d5a5d972c. My existing changes-requested review remains: please sync to current main, rerun the focused signal tests and relevant checks, and obtain a green rerun for the failed Windows relinker job before requesting re-review.

Sources

…-libc-internal

# Conflicts:
#	docs/dev/debt/libSceLibcInternal.md
@ycbuzi

ycbuzi commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 I merged current main 420b6a064e into this branch: head f430c9ec4e, 0 behind. The one conflict was in docs/dev/debt/libSceLibcInternal.md, where #11504 removed the _Xfilesystem_error entry next to this PR's siginterrupt line; I kept it as main has it.

On that head, on Windows: the 22 focused tests (guest_signal_interrupt, guest_signal_handler_mask, guest_signal_sets, guest_signals, the 17 libSceLibcInternal tests and guest_user_context) pass 2 of 2, public_headers (65 tests) passes, and tools/check_conventions.py --base origin/main passes. The export tables are unchanged: only libSceLibcInternal.prx exports siginterrupt_nid_postfix, and libkernel.prx exports _sigaction_nid_postfix and _sigintr_nid_postfix. The Tested section has the line.

The push starts a new hosted run; I'll check that the Windows relinker job is green this time.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@ycbuzi

ycbuzi commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 I merged current main 809c7fa2df into this branch: head 68a0d205c0, with no conflicts. main has moved about 65 commits since; in the paths this PR touches, only libkernel/Semaphore/src/Semaphore.cpp changed.

On that head, on Windows 11, WinLibs GCC 15.2.0, Release:

  • 24 focused tests pass 2 of 2: the libSceLibcInternal tests, guest_signals, guest_signal_interrupt, guest_signal_handler_mask, guest_signal_sets, guest_signal_list, guest_user_context and guest_user_context_exit.
  • public_headers (65 tests) passes 2 of 2.
  • tools/check_conventions.py --base origin/main passes.
  • The one Signals.cpp warning is still _sigintr_nid_postfix "initialized and declared 'extern'".

I did not rerun the export-table comparison on this head. The push starts a new hosted run, and I'll check the Windows relinker job on it. The Tested section has the line. Could you re-review once that run is in?

AI-assisted: yes (Claude Code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ycbuzi

ycbuzi commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 I merged current main 4ac683fe02 into this branch: head d984a64ceb, with no conflicts.

The two write-watch macOS failures on the previous head were add_test given test NAME "write_watch_read-fault" which already exists, from core/libs/tests/write_watch/CMakeLists.txt. This PR does not change that file: main 809c7fa2df, which it had merged, listed the execute-fault read-fault block twice, and current main lists it once. CI on this head should show whether that was the whole cause.

Tested on Windows 11, WinLibs GCC 15.2.0, Release, on the previous head 68a0d205c0 merged onto main a435eddb2f, not on d984a64ceb itself:

  • 7 tests pass 2 of 2: guest_signal_list, guest_user_context, guest_user_context_exit, guest_signals, guest_signal_interrupt, guest_signal_handler_mask, guest_signal_sets.
  • public_headers timed out, so the 64 public_headers_compile_* tests did not run with this change. They passed in the run with this PR's source changes reverted, on a machine that was busy with other disk work. I did not rerun them, so this is not a result for this PR.
  • python3 tools/check_conventions.py --base origin/main passes on d984a64ceb.

AI-assisted (Claude Code).

Picks up 929671a, which restores the check_skips.py that boykopovar#14881 overwrote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
Resolves docs/dev/debt/libc.md: main's updated _Thrd entry, and siginterrupt stays documented in libSceLibcInternal.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 2, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head dae55d9 merged onto main a4eca2a · tested 2026-11-02 21:41 UTC · 31 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,470 passed · 14 failed (0 new, 13 also fail on main, 1 unstable on main) · 59 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,543 of 3,591 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1307 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 121.2 s, ⚠️ agc_driver_graphics_maps_fallback 118.1 s, ⚠️ agc_driver_graphics 109.9 s, ⚠️ agc_driver_bda_device 59.0 s, ⚠️ agc_driver_image_sample_unnormalized 52.4 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 6 main runs
Failing on main too (13, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 751 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (751 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 743 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (59)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWi
Reproduce
git fetch origin dae55d9e1264874b988536d65fd57ec3d012534c a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8
git checkout a4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8 && git merge --no-ff dae55d9e1264874b988536d65fd57ec3d012534c
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
Resolves docs/dev/debt/libkernel.md: main's sigaction entry (SIGPIPE outside Windows) and this branch's signal entry, which points to libSceLibcInternal for siginterrupt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.