Skip to content

fix(libkernel): give guest sockets ordinary descriptor numbers below FD_SETSIZE - #4391

Merged
oneandonlydean merged 5 commits into
boykopovar:mainfrom
MarcZX10:codex/socket-descriptors-4366
Oct 13, 2026
Merged

oneandonlydean merged 5 commits into
boykopovar:mainfrom
MarcZX10:codex/socket-descriptors-4366

Conversation

@MarcZX10

@MarcZX10 MarcZX10 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes the socket descriptor overflow reported in #4366. Libkernel sockets, socket pairs, accepted sockets, and libSceNet sockets reserve ordinary host descriptor numbers from the shared descriptor table, keeping them within FD_SETSIZE while fewer than 1024 descriptors are open. Descriptor dispatch now checks socket-table membership; select handles libkernel sockets alongside the existing descriptor groups. The kqueue and file-event paths also identify sockets by table membership so the low-numbered descriptors work with current main.

Carries screamm's implementation commit 20378375b with its original author preserved. Integration changes update the setsockopt ownership check, return EBADF from fstat for a closed low-numbered socket descriptor, and route descriptor cleanup through the current equeue behavior. Socket fstat remains unsupported, as in the issue's proposed scope.

Tested

Linux, Debian 12, GCC 12.2, Release, Ninja, BUILD_TESTING=ON, configured from this rebased head on current main c13dc7e6b:

  • Built libkernel, libSceNet, libScePosixForWebKit and the focused socket/event test executables (148 Ninja steps).
  • CTest passed 10/10: guest_sce_net, guest_posix_filesystem, guest_socket_events, guest_poll, guest_select, guest_socket_pair, guest_dup, guest_kqueue, guest_socket_descriptors and guest_fstatfs.
  • python3 tools/check_conventions.py --base upstream/main passed.
  • git diff --check upstream/main...HEAD passed.

No Windows build or title run was performed on this head.

Checklist

@LeandroLP23

Copy link
Copy Markdown
Contributor

Windows run of this head (71b717ce5) merged onto current main (9aa5fd290): Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release, full build including libs.

  • 15 socket, file and network tests pass 3/3: guest_socket_descriptors, guest_poll, guest_dup, guest_socket_pair, guest_sce_net, guest_fstatfs, guest_posix_filesystem, guest_tcp, guest_udp, guest_aio, guest_aio_bad_descriptors, guest_resolver, guest_http, guest_http2, guest_http_response_header.
  • With the ten production files reverted to main, 7 of them fail: guest_socket_descriptors (line 77), guest_poll, guest_dup, guest_socket_pair, guest_sce_net, guest_posix_filesystem (line 113, errno 25) and guest_fstatfs (line 119). So the new cases exercise the change on Windows.
  • The whole non-AGC suite passes: 513/513 (ctest -E '^agc_' -j 4). The change touches no AGC code.
  • Titles, 60 s each:

Upstream skips the Windows job on PRs, so this is the first Windows run of this branch.

@xXPBSXx

xXPBSXx commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Windows test: head 71b717ce5 merged onto current main e7c70a2df (clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release, -j4: full build 0 errors; ctest with the filter guest_dup, guest_fstatfs, guest_poll, guest_posix_filesystem, guest_sce_net, guest_select, guest_socket_descriptors, guest_socket_pair (matched 7 tests): 7/7 passed; python tools/check_conventions.py --base upstream/main passed. I did not run the new tests against main without the change.

AI-assisted (Claude Code).

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed labels Oct 12, 2026
@xXPBSXx

xXPBSXx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Two findings on head 71b717ce5.

1. It no longer merges onto current main (3d8ffeb27). sceKernelFcntl in Open.cpp conflicts with the FcntlArgumentOf rework, and main now has three more FirstDescriptor comparisons that this PR removes from the header, so a plain merge also fails to compile:

  • Open.cpp: sceKernelFcntl (d < GuestSockets::FirstDescriptor)
  • Udp.cpp: fcntl_nid_postfix and ioctl_nid_postfix
  • Stdio.cpp: the F_DUPFD branch of fcntl (non-Windows only)

I resolved these locally by testing GuestSockets::IsOpen(d) instead (and dropping the non-Windows range throw). Windows 10, GCC 15.2.0 (WinLibs r7), Release, full build 0 errors; guest_socket_descriptors, guest_socket_read_write, guest_socket_pair, guest_socket_events, guest_poll, guest_dup, guest_fstatfs, guest_posix_filesystem, guest_filesystem, guest_equeue_events, guest_tcp and guest_udp pass (12 of 12 in that filter). This is a local merge, not pushed.

2. The Mound (PPSA26223), 150 s each, observation only.

  • Head 71b717ce5 on its own base: no FATAL, no RtcNetworkThread fault; the title ran the whole 150 s and was stopped by the time limit. The Dying Light 2 (PPSA02262) on Windows: what stops it between conversion and its own startup #1794 stop (FD_SET with 0x10000005) is gone.
  • Head merged with main 3d8ffeb27 (resolution above): RtcNetworkThread is alive in the thread dump when the title aborts, and the abort is an unrelated GPU one (storage image access to depth/stencil surface ... is not implemented).

Palworld (PPSA23126) with the same merge (plus the three file/event export declarations from Rohan03x's branch) binds all imports, but aborts earlier in the shader recompiler (packed pixel ancillary input has an unsupported live use) before any EOS thread starts, so it does not show whether select is fixed there.

AI-assisted (Claude Code).

@xXPBSXx

xXPBSXx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

For anyone carrying this: the merge of head 71b717ce5 onto current main (0ef9dc928) is on my fork as one merge commit, https://github.com/xXPBSXx/AnyPS5/tree/fix/socket-descriptors-4391-on-main (9d6fa7c3f). Nothing was changed beyond resolving the conflicts:

  • Open.cpp: sceKernelFcntl keeps main's FcntlArgumentOf and tests !GuestSockets::IsOpen(d); sceKernelClose (new on main) tests IsOpen(d).
  • Udp.cpp: fcntl_nid_postfix and ioctl_nid_postfix test !GuestSockets::IsOpen(...); Stdio.cpp: the non-Windows F_DUPFD range throw is dropped (FirstDescriptor no longer exists).
  • TechnicalDebt.md: main's new send/sendto entry kept next to this PR's socket-number and poll entries.

Windows 10, GCC 15.2.0 (WinLibs r7), Release: full build 0 errors, 26 of 26 tests in the socket, poll, dup, fstatfs, file system, TCP/UDP and libSceNet filter pass. No title run on this exact merge.

AI-assisted (Claude Code).

@xXPBSXx

xXPBSXx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Interaction of this PR with the other open descriptor PRs, from git merge-tree against the merge of this head with current main (9d6fa7c3f on my fork, see above); nothing was built for these combinations:

PR Merges with main Merges after this PR Conflicting files
#3649 (poll on files, Windows pipe read ends) yes no Socket/src/Udp.cpp, tests/GuestPoll.cpp, TechnicalDebt.md
#3644 (poll pipe descriptors) no (TechnicalDebt.md) no Socket/src/Udp.cpp, tests/GuestPoll.cpp, TechnicalDebt.md
#4351 (fstat on a guest socket) yes no File/src/Stdio.cpp, Socket/include/SocketRuntime.hpp, TechnicalDebt.md
#4053 (close guest sockets in sceKernelClose) yes yes none

AI-assisted (Claude Code).

@blawesom

Copy link
Copy Markdown
Contributor

Heads-up before review: this PR reworks the guest-socket descriptor scheme to ordinary numbers below FD_SETSIZE, but main landed the opposite direction this morning — 591e8ddad ("feat(libkernel): support fcntl on non-socket descriptors") and 01b7bb3e2 ("support ioctl on non-socket descriptors") route sockets through GuestSockets::FirstDescriptor (high descriptor numbers, membership by range check).

A plain rebase therefore isn't mechanical: every d >= GuestSockets::FirstDescriptor range check main added (in sceKernelClose, sceKernelFcntl, sceKernelIoctl, …) collides with this PR's GuestSockets::IsOpen(d) membership checks — the two schemes are mutually exclusive across the ~20 files this PR touches.

Options as I see them: either this PR is a deliberate counter-proposal to the FirstDescriptor scheme (in which case the maintainers should weigh the two designs before anyone spends rebase effort), or it predates awareness of the new scheme and wants reworking on top of it. Flagging so that's visible either way — happy to attempt the full semantic rebase if the ordinary-numbers design is the one that should win.

@MarcZX10
MarcZX10 force-pushed the codex/socket-descriptors-4366 branch from 71b717c to d39b707 Compare October 12, 2026 16:04
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
@MarcZX10
MarcZX10 force-pushed the codex/socket-descriptors-4366 branch from e019fbf to e0ec0c8 Compare October 13, 2026 03:28
@MarcZX10

MarcZX10 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto current main c13dc7e6b and pushed head e0ec0c809. The rebase keeps low-numbered socket descriptors and routes the new kqueue/file-event checks through GuestSockets::IsOpen, including the range checks called out above. The low-descriptor test setup and current main's pipe-poll behavior are both retained.

Linux Debian 12 / GCC 12.2 Release: built the affected libraries and focused test targets (148 Ninja steps); CTest passed 10/10, including guest_kqueue, guest_socket_descriptors, guest_socket_events, guest_poll, guest_select, guest_dup, guest_socket_pair, guest_sce_net, guest_posix_filesystem and guest_fstatfs. Conventions and git diff --check pass. I have not run Windows or a title on this head.

@github-actions

github-actions Bot commented Oct 13, 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
#4525 core/libs/prx/libkernel/Socket/src/Udp.cpp
docs/dev/debt/libkernel.md L140-142
#4585 docs/dev/debt/libkernel.md L126-128
#4719 core/libs/prx/libkernel/File/src/Stdio.cpp L726-732
#4754 core/libs/prx/libkernel/Socket/src/Socket.cpp L248-250
#4818 core/libs/prx/libkernel/File/src/Stdio.cpp L759-762
#4903 core/libs/prx/libkernel/File/src/Stdio.cpp L645-646, L807
core/libs/prx/libkernel/Socket/include/SocketRuntime.hpp L4, L17-18
docs/dev/debt/libkernel.md L140-142
#4908 core/libs/prx/libkernel/Equeue/Equeue.cpp L599-602
#4910 core/libs/prx/libkernel/Equeue/Equeue.cpp L596-597, L599-605
core/libs/prx/libkernel/Equeue/src/Kqueue.cpp L121-122, L138-142
core/libs/prx/libkernel/Socket/include/SocketRuntime.hpp L18
core/libs/prx/libkernel/Socket/src/Udp.cpp L539
#4929 core/libs/prx/libkernel/File/src/Stdio.cpp L643-646, L759-762

@nicolasfalesy

Copy link
Copy Markdown
Contributor

Reran ProsperoLight (PPSA99002) on this head (e0ec0c809) on Linux (Arch, Release, relinked with --to-intel): 3 of 3 runs still abort, now with

what():  fcntl: descriptor 47 is neither a file, a directory, a pipe nor a character device

(41 in one run). strace shows the libSceNet socket now gets a low descriptor as intended (socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) = 46, fcntl(46, F_DUPFD_CLOEXEC, 0) = 47), and the guest's fcntl(47, F_GETFL) / fcntl(47, F_SETFL, O_NONBLOCK) reaches File::Fcntl, whose Linux Classify sees S_IFSOCK and throws. So for this title the remaining piece is fcntl F_GETFL/F_SETFL (O_NONBLOCK) on socket descriptors, routed through the socket table like the equeue checks. Happy to rerun once that's in, here or in a follow-up.

Tested with Claude Code assistance.

@nicolasfalesy

Copy link
Copy Markdown
Contributor

Opened #4924 on top of this branch for the fcntl part (libSceNet registers a status control with libkernel, like its option setter). With it ProsperoLight gets past fcntl and stops next on poll: descriptor 47 is neither a socket nor a pipe.

@nicolasfalesy

Copy link
Copy Markdown
Contributor

With #4924 (fcntl) and #4933 (poll) on top of this branch, ProsperoLight (PPSA99002) runs 3 of 3 times for 60 s on Linux and reaches its main screen ("Your PCs", Sunshine discovery running). So on Linux this branch plus those two clears every socket stop this title hits.

@oneandonlydean
oneandonlydean merged commit c2565f0 into boykopovar:main Oct 13, 2026
10 of 11 checks passed
nicolasfalesy added a commit to nicolasfalesy/AnyPS5 that referenced this pull request Oct 13, 2026
With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), a title
that makes a libSceNet socket non-blocking with plain fcntl(F_GETFL) and
fcntl(F_SETFL, O_NONBLOCK) reached File::Fcntl, whose classification
throws for a socket. libSceNet now registers a status control with
libkernel, like its option setter: F_GETFL returns O_RDWR with the
socket's non-blocking flag, F_SETFL sets it through SO_NBIO, as fcntl
already does for libkernel sockets. ProsperoLight (PPSA99002) stopped
here on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WeVmjnnPPKdxVTpr2Vjtw
nicolasfalesy added a commit to nicolasfalesy/AnyPS5 that referenced this pull request Oct 13, 2026
With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), poll on a
libSceNet socket threw "neither a socket nor a pipe": poll only knew
libkernel sockets and pipes, while select already asks libSceNet through
its poller. libSceNet now lends libkernel the host socket behind a
descriptor, together with an owner that keeps it open, so poll puts it in
the same WSAPoll or poll call as libkernel sockets. ProsperoLight
(PPSA99002) stopped here on Linux and now reaches its PC list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvDbpwUPTa78oCAJqe7m9K
adriadam10 pushed a commit to nicolasfalesy/AnyPS5 that referenced this pull request Oct 14, 2026
With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), a title
that makes a libSceNet socket non-blocking with plain fcntl(F_GETFL) and
fcntl(F_SETFL, O_NONBLOCK) reached File::Fcntl, whose classification
throws for a socket. libSceNet now registers a status control with
libkernel, like its option setter: F_GETFL returns O_RDWR with the
socket's non-blocking flag, F_SETFL sets it through SO_NBIO, as fcntl
already does for libkernel sockets. ProsperoLight (PPSA99002) stopped
here on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WeVmjnnPPKdxVTpr2Vjtw
adriadam10 pushed a commit to nicolasfalesy/AnyPS5 that referenced this pull request Oct 14, 2026
With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), poll on a
libSceNet socket threw "neither a socket nor a pipe": poll only knew
libkernel sockets and pipes, while select already asks libSceNet through
its poller. libSceNet now lends libkernel the host socket behind a
descriptor, together with an owner that keeps it open, so poll puts it in
the same WSAPoll or poll call as libkernel sockets. ProsperoLight
(PPSA99002) stopped here on Linux and now reaches its PC list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvDbpwUPTa78oCAJqe7m9K
RINNECODER added a commit to RINNECODER/AnyPS5 that referenced this pull request Oct 15, 2026
* feat(libkernel): implement sigsuspend on the pending-signal set

(cherry picked from commit b3d850d)

* docs(libkernel): record sigsuspend 32-signal mask limit

(cherry picked from commit 38e2db3)

* feat(libkernel): share pause wait loop and _sigprocmask restore in sigsuspend

(cherry picked from commit 1ce5c2c)

* feat(libkernel): EVFILT_VNODE on macOS through the host kqueue

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 84bb450)

* feat(libkernel): implement mincore

Implement mincore (+hFjyohmOU0) in libkernel following FreeBSD 11's sys_mincore (sys/vm/vm_mmap.c). Validate page alignment, return EFAULT for null vector, check range bounds and residency via sceKernelVirtualQuery, and report MINCORE_INCORE (1) for resident pages. Required by a Java 25 homebrew title.

(cherry picked from commit 7781eda)

* fix(libkernel): round mincore address down as FreeBSD does

Follow FreeBSD 11's sys_mincore by rounding unaligned address down to page boundary rather than returning EINVAL. Update guest memory test and document unmodeled residency/referenced/modified bits in libkernel technical debt.

(cherry picked from commit 3699eff)

* fix(libkernel): follow kern_mincore order and report reserved pages as not resident

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 2854d51)

* feat(libc): add optional log timestamps

(cherry picked from commit 2cc4999)

* fix(libkernel): accept MSG_DONTWAIT in the socket send and receive calls

send, sendto, sendmsg, recv, recvfrom and recvmsg failed with EOPNOTSUPP
for MSG_DONTWAIT (0x80), so code that polls a blocking socket with it
got an error on every call instead of its data or EWOULDBLOCK.

FreeBSD 11.4 defines the flag in sys/sys/socket.h:

	#define	MSG_DONTWAIT	0x80		/* this message should be nonblocking */

and soreceive_generic() (sys/kern/uipc_socket.c) treats it as a
non-blocking socket for that one call:

		if ((so->so_state & SS_NBIO) ||
		    (flags & (MSG_DONTWAIT|MSG_NBIO))) {
			SOCKBUF_UNLOCK(&so->so_rcv);
			error = EWOULDBLOCK;
			goto release;

On Linux and macOS the flag now maps to the host's MSG_DONTWAIT, next to
MSG_PEEK on a receive and MSG_NOSIGNAL on a send. Winsock has no
per-call non-blocking flag, so Windows keeps failing with EOPNOTSUPP
for it; TechnicalDebt records that. Other flags still fail with
EOPNOTSUPP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7afd889)

* fix(libkernel): answer fcntl status flags on libSceNet sockets

With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), a title
that makes a libSceNet socket non-blocking with plain fcntl(F_GETFL) and
fcntl(F_SETFL, O_NONBLOCK) reached File::Fcntl, whose classification
throws for a socket. libSceNet now registers a status control with
libkernel, like its option setter: F_GETFL returns O_RDWR with the
socket's non-blocking flag, F_SETFL sets it through SO_NBIO, as fcntl
already does for libkernel sockets. A homebrew title stopped
here on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017WeVmjnnPPKdxVTpr2Vjtw
(cherry picked from commit 5dcf28d)

* fix(libc): preserve path services through process exit

(cherry picked from commit 99ae2e8)

* fix(memory): preserve process-owned services during exit

(cherry picked from commit d50eed2)

* fix(libkernel): keep host standard streams open on guest close

Guest descriptors are host C runtime descriptors. Closing descriptor 0, 1
or 2 closed the host process's standard stream, and the runtime then gave
that number to the next file opened anywhere in the process, including
files libkernel opens itself, such as the APR reader's. The title's next
close of the same number closed that file mid-read.

close and sceKernelClose now fail with EBADF for descriptors 0 to 2 that
were open when libkernel loaded, and leave them open. A standard
descriptor that was not open at load can still be opened and closed by
the guest.

A title calls sceKernelClose(0) repeatedly while loading asset
bundles, which made APR reads return 0 or a part of the requested bytes
and raised UCRT invalid parameter reports from close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8029428)

* fix(libkernel): poll libSceNet sockets with the host wait

With libSceNet sockets on ordinary descriptor numbers (boykopovar#4391), poll on a
libSceNet socket threw "neither a socket nor a pipe": poll only knew
libkernel sockets and pipes, while select already asks libSceNet through
its poller. libSceNet now lends libkernel the host socket behind a
descriptor, together with an owner that keeps it open, so poll puts it in
the same WSAPoll or poll call as libkernel sockets. A homebrew title
stopped here on Linux and now reaches its PC list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvDbpwUPTa78oCAJqe7m9K
(cherry picked from commit 62d8eea)

* fix(libkernel): answer F_GETFD and F_SETFD on a guest socket

fcntl on a guest socket handled F_GETFL and F_SETFL only and failed every other command with EINVAL, so libcurl's fcntl(fd, F_SETFD, FD_CLOEXEC) on a new socket failed (seen in a homebrew title, boykopovar#4796). Record FD_CLOEXEC per socket descriptor: F_SETFD sets or clears it, F_GETFD reads it, SOCK_CLOEXEC sets it at creation, and dup, dup2 and close start without it, as FreeBSD's kern_fcntl and kern_dup do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 84aa234)

* fix(libkernel): fail sceKernelMprotect over an unmapped range with EINVAL instead of aborting

The allocation tracker threw a runtime_error (a hole in the protected range) from inside
sceKernelMprotect, which terminated the title. mprotect already turned the exception into
EINVAL. sceKernelMprotect and sceKernelMtypeprotect now check that the range is registered
first and return EINVAL; the retype of direct mappings is skipped on failure.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 05ffb45)

* fix(libkernel): fall back below a mapping hint with no room above it

A mapping without MAP_FIXED treated its address as the lowest place it
could go, and a hint at or above the end of the guest arena threw on the
host. FreeBSD 11.4's vm_mmap_object places such mappings with
vm_map_find_min, which takes the address as a hint only: it tries at or
above it, then again from its minimum address.

GuestArenaAllocateFromHint does the same in the arena: at or above the
hint when it lies below the arena's end and a range fits there, otherwise
from the arena's start. MapPlaced and the Windows mmap_aligned use it for
hinted mappings; GuestArenaAllocateAtOrAbove keeps its meaning for the
callers that need a range above an address.

A homebrew title reserves its JIT range with
sceKernelReserveVirtualRange and a hint near its own code, a host address
above the arena here, and aborted with "mapping address hint is above the
guest address space arena" when launching a 3DS title.

(cherry picked from commit a016b4f)

* docs(debt): note the fallback of mapping hints with no room above them

(cherry picked from commit aca7a3a)

* fix(libkernel): check every part of an mprotect range for pins before protecting the first

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 238fe1e)

* fix(libkernel): give an inheriting thread its creator's priority

Measured on a PS5 (firmware 13.60): a thread created with
PTHREAD_INHERIT_SCHED, a null attribute or a default attribute runs at
its creator's priority, whatever priority the attribute holds; with
explicit scheduling it takes the attribute's priority.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 143eb6a)

* fix(libkernel): convert local time with the host time zone

sceKernelConvertUtcToLocaltime and sceKernelConvertLocaltimeToUtc returned
the time unchanged while libc localtime follows the host zone, so a title
that mixes them shows UTC as local time (boykopovar#5067).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iLxaSz4qjmirfqKZdhVQk
(cherry picked from commit 56c8f34)

* fix(libkernel): report west_sec as seconds east of UTC

A homebrew emulator documents that the console fills west_sec with the
offset east of UTC despite the field's name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iLxaSz4qjmirfqKZdhVQk
(cherry picked from commit ae7f5e3)

* fix(libkernel): call tzset before reading the host zone offsets

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iLxaSz4qjmirfqKZdhVQk
(cherry picked from commit 1614d82)

* fix(libkernel): report the zone's daylight saving amount from sceKernelConvertLocaltimeToUtc

libc mktime subtracts it when tm_isdst is set outside summer time, so it
must not be zero there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017iLxaSz4qjmirfqKZdhVQk
(cherry picked from commit 15969f2)

* fix(libSceSystemService): end LoadExec exit without running guest exit handlers

(cherry picked from commit 2dd7f2b)

* feat(libc): lazily initialize application heap on first access

(cherry picked from commit cee2006)

* fix(libkernel): name the failing vnode watch in the kqueue notification error

The Windows error for a refused FindFirstChangeNotification was one string shared
by WatchParent and WatchContents, so the log could not tell which handle or path
was denied. Build it from the watcher, the path the API was given and
GetLastError instead.

Still throws: the EVFILT_VNODE attach path is vfs_kqfilter, which returns only
EINVAL, ENOMEM or 0, with EBADF from fget before it, and consults no directory
permission, so no FreeBSD errno stands for a host that refuses to notify.

(cherry picked from commit e9d3677)

* docs(debt): keep title IDs out of the ported libkernel debt lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj

* fix(libkernel): keep the reused-page table on Darwin after the exit-lifetime change

The picked lifetime change moved the physical-used table into the process
state behind a Linux-only guard. This fork's direct memory zeroes reused
pages on Darwin as well, so the table and its accessor need the same guard
as ZeroReusedPhysical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj

* test(libc): do not register the lazy application-heap test on macOS

The lazy mode needs process parameters that ApplicationHeap.cpp installs
only on Windows and Linux, so on macOS the test fails deterministically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj

---------

Co-authored-by: Kurenaiiiii <Kurenaiiiii@users.noreply.github.com>
Co-authored-by: Oleksandr Sierov <50950970+OleksandrS23@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Amirtheshwaran Navaneethakrishnan <anavane1@charlotte.edu>
Co-authored-by: Adrià Franch <adriadam10@gmail.com>
Co-authored-by: MarcZX100 <marczxrr@gmail.com>
Co-authored-by: milescoviello <kitslayer29@gmail.com>
Co-authored-by: Nicolas Falesy <112726756+nicolasfalesy@users.noreply.github.com>
Co-authored-by: krishalivaibhav <krishalivaibhav@gmail.com>
Co-authored-by: SynnZer0 <243459655+SynnZer0@users.noreply.github.com>
Co-authored-by: xXPBSXx <20614131+xXPBSXx@users.noreply.github.com>
Co-authored-by: Yossi Yadgar <yadgar360@gmail.com>
Co-authored-by: hugodearaujo <hugoinjustice@gmail.com>
Co-authored-by: David-cmrg <202826622+David-cmrg@users.noreply.github.com>
Co-authored-by: hamb3r <hamb3r>
Co-authored-by: Rujul Talekar <113801876+Roojool@users.noreply.github.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.

7 participants