Commit Graph
12196 Commits
Author SHA1 Message Date
Dean ca5cd3128b Merge pull request #8013 from MarrasFederico/feat/sce-net-clear-dns-cache
feat(libSceNet): accept sceNetClearDnsCache with no library DNS cache to drop
2026-10-20 17:46:56 +13:00
Dean 8aae1d2005 Merge pull request #8000 from AkulTyagi11/test/libc-integer-builtins-edge-cases
test(libc): cover integer builtins edge cases
2026-10-20 17:46:53 +13:00
Dean 0d8be218a8 Merge pull request #7990 from MarrasFederico/feat/audioin-gain-and-reroute-count
feat(audioin): implement sceAudioInGetGain and sceAudioInGetRerouteCount
2026-10-20 17:46:45 +13:00
aasishdairel cde44070e0 fix(relinker): trap GS overrides on implicit memory operands
MASKMOVQ, MASKMOVDQU, VMASKMOVDQU, MONITOR and MONITORX use a register-form ModRM byte but still access memory at DS:rDI or DS:rAX. Mark them as memory operands and cover the encodings in the Windows and macOS GS trap tests.
2026-10-20 10:13:34 +05:30
aasishdairel 570c3297d3 fix(relinker): trap only GS memory accesses in Windows and macOS output 2026-10-20 10:13:34 +05:30
Dean 49fd13a741 Merge pull request #7958 from Lindamea1/fix/libkernel-available-direct-memory-enomem
fix(libkernel): return ENOMEM from sceKernelAvailableDirectMemorySize when the range has no free block
2026-10-20 17:40:24 +13:00
Dean Galvin 20f75e94e0 Merge main into pr-8037
# Conflicts:
#	core/libs/tests/GuestStrings.cpp
2026-10-20 17:40:21 +13:00
Dean 56a0be39dd Merge pull request #7957 from Lindamea1/fix/libkernel-attrget-esrch-ended-thread
fix(libkernel): return ESRCH from scePthreadAttrGet for a thread that has ended
2026-10-20 17:40:20 +13:00
Dean dfc987cde1 Merge pull request #8190 from xXPBSXx/fix/scenet-dontwait-windows-fb
fix(libSceNet): honour MSG_DONTWAIT in the send and receive calls on Windows
2026-10-20 17:40:15 +13:00
Dean a5ea7c2102 Merge pull request #7955 from alexpournaras/fix/videoout-title-fps-host-clock
fix(libSceVideoOut): count window-title FPS on the host clock
2026-10-20 17:38:05 +13:00
Savvanis SpyrosandClaude Opus 5.5 9d659c509d fix(agc): bind a strided buffer's last record only up to the render target it runs into
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 07:31:41 +03:00
JJenkx 63dbd310ba feat(ult): bind condition variables to the current mutex lifecycle 2026-10-20 00:23:58 -04:00
jagrat Singh 50375074d0 feat(libSceNet): implement sceNetShowRoute
Implement sceNetShowRoute as a silent stub returning 0, matching the (void) signature in shadPS4 and the behavior of sceNetShowIfconfig and sceNetShowNetstat. Adds guest unit tests in GuestSceNet.cpp and updates technical debt documentation.
2026-10-20 09:51:48 +05:30
Dean 11ee778434 Merge pull request #7946 from Whitesun123/fix/libc-localtime-overflow
fix(libc): reduce extreme localtime_s inputs without overflow
2026-10-20 17:18:55 +13:00
Dean Galvin ace51add87 Merge main into pr-6513 2026-10-20 17:09:07 +13:00
Dean cb3f18fda8 Merge pull request #7940 from pushkarreddyy/feat/libkernel-setgid
feat(libkernel): implement setgid
2026-10-20 17:05:47 +13:00
Dean a212ddc7b3 Merge pull request #6838 from al3w0f205/feat/ult-firmware-exports
feat(libSceUlt): export missing firmware functions from database
2026-10-20 17:05:35 +13:00
xXPBSXxandClaude Sonnet 5.5 ba0755337d fix(libSceNet): pass MSG_DONTWAIT to the wait for a local address on Windows
sceNetRecv, sceNetRecvfrom and sceNetRecvmsg on a datagram socket without a
local address waited in wait_for_local_address until the socket was bound,
connected or written to, because only a non-blocking socket made that wait
fail. FreeBSD 11.4 soreceive_dgram fails a MSG_DONTWAIT receive without data
with EWOULDBLOCK. The flags now reach wait_for_local_address and the test
covers an unbound socket.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 06:05:03 +02:00
xXPBSXxandClaude Sonnet 5.5 a39effcef9 fix(libSceNet): honour MSG_DONTWAIT in the send and receive calls on Windows
sceNetSend, sceNetSendto, sceNetSendmsg, sceNetRecv, sceNetRecvfrom and
sceNetRecvmsg failed with EOPNOTSUPP for MSG_DONTWAIT on Windows, where
FreeBSD 11.4 sosend_generic and soreceive_generic make the one call
non-blocking and fail with EWOULDBLOCK when it would wait. Winsock has no
per-call flag, so the call now asks WSAPoll with a zero timeout whether the
socket is ready and fails with EAGAIN when it is not. The Windows branch of
the test that expected EOPNOTSUPP now runs the checks of the other hosts.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 06:05:03 +02:00
Dean fdf631ac9b Merge pull request #7913 from mazen320/fix/pending-producer-event-sync
fix(agc): hold a pending producer batch with a timeline semaphore
2026-10-20 17:04:15 +13:00
al3w0f205 df0780c623 test(libSceConvertKeycode): cover space, punctuation and keypad keycode mappings 2026-10-19 23:01:34 -05:00
xXPBSXxandClaude Sonnet 5.5 7f32f42627 fix(libkernel): fail chmod, truncate, utimes and rename through a regular file with ENOTDIR on Windows
A path whose directory part is a regular file, such as file/child, failed
with ENOENT in chmod, truncate, utimes and rename on Windows, where FreeBSD
11.4 fails it with ENOTDIR (vfs_cache_lookup, sys/kern/vfs_cache.c). The
not-found error of these calls now asks whether the nearest existing
ancestor is not a directory, as open, stat, lstat, access and unlink do.
For rename the source ancestor is checked first and the destination ancestor
only while the source exists. A test line that expected ENOENT for truncate
of a path below a regular file now expects ENOTDIR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 06:01:12 +02:00
bluandClaude Opus 5.5 213327fede fix(libc): keep fmin and fmax quiet on a signalling NaN
fmin, fmax and their f and l forms tested their operands with std::isnan,
which GCC compiles to a compare that raises FE_INVALID for a signalling
NaN. FreeBSD's s_fmax.c and s_fmin.c read the exponent and significand
bits instead, "to avoid raising spurious exceptions", and return the
other operand. The NaN test now reads the bits of float, double and the
80-bit long double.

GuestFminf checks that a signalling NaN on either side returns the other
operand and leaves FE_INVALID clear, for all three types.

The failure was first caught by the numeric helper test of
boykopovar/AnyPS5#2280 (Привалов Александр Владимирович).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 21:00:40 -07:00
xXPBSXxandClaude Sonnet 5.5 cb6cd768ef fix(libkernel): fail open, stat, lstat, access and unlink through a regular file with ENOTDIR on Windows
A path whose directory part is a regular file, such as file/child, failed
with ENOENT in open, stat, lstat, access and unlink on Windows, where
FreeBSD 11.4 lookup fails it with ENOTDIR (vfs_cache_lookup, sys/kern/vfs_cache.c).
mkdir and rmdir already did. A not-found error of these calls now asks whether the
nearest existing ancestor is not a directory and reports ENOTDIR then.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 06:00:15 +02:00
Dean b4887d4b0a Merge pull request #7932 from m335671/fix/dispatch-write-ranges-null-image
fix(agc): skip null storage images in a dispatch's write ranges
2026-10-20 17:00:12 +13:00
Dean fb62f11b33 Merge pull request #7916 from DavidAmsellem/test/agc-vouched-lookups-import-probe
test(agc): skip vouched lookups where host imports report GPU reads as writes
2026-10-20 16:59:39 +13:00
xXPBSXxandClaude Sonnet 5.5 bcbcf55b5b fix(libkernel): extend a file with ftruncate without writing zero bytes on Windows
ftruncate, truncate and sceKernelFtruncate extended a file through _chsize_s,
which writes the whole new length as zero bytes. FreeBSD extends the file
without writing data (kern_ftruncate -> ffs_truncate) and fails a length the
file system cannot hold with EFBIG. NativeFtruncate now sets the end of file
with SetFileInformationByHandle and maps ERROR_DISK_FULL to ENOSPC and
ERROR_FILE_TOO_LARGE/ERROR_INVALID_PARAMETER to EFBIG.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 05:58:22 +02:00
Dean Galvin f26445217f Merge main into pr-7690
# Conflicts:
#	docs/dev/debt/libSceHmd2.md
2026-10-20 16:54:12 +13:00
Dean 525e299fc0 Merge pull request #8184 from xXPBSXx/fix/fsync-pipe-fb
fix(libkernel): fail fsync and fdatasync on a pipe with EINVAL
2026-10-20 16:24:09 +13:00
Dean 28a9be72a4 Merge pull request #8182 from xXPBSXx/fix/flock-bad-descriptor-fb
fix(libkernel): fail flock on an invalid descriptor with EBADF and on a pipe with EOPNOTSUPP
2026-10-20 16:23:47 +13:00
bluandClaude Opus 5.5 5c1eba11af fix(libc): honour the rounding mode in rint and rintf
MathExact.cpp was built without -frounding-math, so GCC compiled
std::rint as an add and subtract of 2^52 on the magnitude, which is exact
only when rounding to nearest: under FE_DOWNWARD rint(-1.5) returned -1
and rintf(-1.5f) -1, where C and FreeBSD's libm give -2. lrint and llrint
were right: they call the host libm's llrint, which honours the mode.

MathExact.cpp now builds with -frounding-math. GuestMathExact checks
rint, rintf, rintl, lrint and llrint of -1.5 and 1.5 in all four rounding
modes and that the mode is unchanged.

The failure was first caught by the rounding test of
boykopovar/AnyPS5#2235 (Привалов Александр Владимирович).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 20:23:35 -07:00
Dean 1ae92bb7c9 Merge pull request #8174 from xXPBSXx/fix/rename-dot-component-fb
fix(libc): fail a rename of a path that ends in a dot component with EINVAL
2026-10-20 16:23:33 +13:00
Dean 0db8299723 Merge pull request #8178 from xXPBSXx/feat/fdopendir-position-fb
fix(libSceLibcInternal): start fdopendir at the descriptor position and set FD_CLOEXEC
2026-10-20 16:23:03 +13:00
Dean d85b7c759a Merge pull request #2780 from SuarezPM/ai/relinker-hardening
feat(relinker): lower MCOMMIT and RDPRU for Intel with execution tests
2026-10-20 16:22:49 +13:00
Dean 4405703fa6 Merge pull request #8186 from xXPBSXx/fix/socket-dontwait-windows-fb
fix(libkernel): honour MSG_DONTWAIT in the socket send and receive calls on Windows
2026-10-20 16:22:35 +13:00
Dean d19c3d6db8 Merge pull request #8188 from xXPBSXx/fix/listen-connected-socket-fb
fix(libkernel): fail listen on a connected socket with EINVAL
2026-10-20 16:22:22 +13:00
Dean 53415f5ec6 Merge pull request #8192 from xXPBSXx/fix/fopen-directory-write-fb
fix(libc): fail fopen and freopen of a directory for writing with EISDIR on Windows
2026-10-20 16:22:17 +13:00
Dean 5575402042 Merge pull request #7866 from milescoviello/fix/asan-driver-memory
fix(agc): map the AGC driver memory past ASan's shadow in an ASan build
2026-10-20 16:22:03 +13:00
jagrat Singh f5b5682575 feat(libSceSystemGesture): implement sceSystemGestureGetTouchEventByEventID 2026-10-20 08:45:30 +05:30
al3w0f205 a8c5a3afc8 fix(libSceLibcInternal): check null output before path in statvfs 2026-10-19 22:14:06 -05:00
Adrià 38d7e344b1 Merge pull request #7871 from Ondra97/codex/perf-cse-operand-keys
perf(shader): keep redundant expression operand keys inline
2026-10-20 05:04:22 +02:00
milescovielloandClaude Opus 5.5 c76299f217 fix(shader): write a poisoned guarded read's record with an atomic store
Invocations of one dispatch that fault through different guards wrote
the guard word with plain stores, which the Vulkan memory model treats
as a data race. The write is now a relaxed device-scope OpAtomicStore,
so one of the records is reported whole. The guarded-pointer test now
also has two workgroups fault through a null and an unmapped pointer.
MarcZX100 pointed out the race.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 03:02:33 +00:00
milescovielloandClaude Opus 5.5 c9e38be258 perf(shader): name a poisoned guarded SRT read in the fault buffer
A ReadConst of a guarded flattened-SRT slot called record_bda_fault
with the poison record's pc and address when the slot's flag was set.
NVIDIA's compiler pays for every call site in a large function:
Crimson Desert's 1,916,980-word compute module has 2,769 guarded
reads, and its pipeline took 99 s and 5.9 GiB to create.

The read now stores the record's flattened-SRT word, tagged with its
stage, to a new fault-buffer word after the written-page list, and
stops as before. The host reads the pc and address from that stage's
flattened SRT and raises the same Unmapped fault. Poisoned and clean
captures still share one variant, specialization and pipeline, and
the existing words keep their offsets, so cached modules from before
still report through record_bda_fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 03:02:32 +00:00
al3w0f205 e426315441 fix(libc): check access mode before the path 2026-10-19 21:57:31 -05:00
Dean 7020db3098 Merge pull request #8156 from xXPBSXx/fix/socket-call-on-non-socket-v4
fix(libkernel): fail a socket call on an open non-socket descriptor with ENOTSOCK
2026-10-20 15:53:25 +13:00
Dean ebb8610b82 Merge pull request #8154 from xXPBSXx/fix/socket-address-length-v4
fix(libkernel): fail a short or long socket address like FreeBSD
2026-10-20 15:53:11 +13:00
Dean 4a7fd7fa4a Merge pull request #7778 from YossiYad/fix/videodec2-avcc-length-startcode
fix(libSceVideodec2): frame an access unit whose length prefix looks like a start code
2026-10-20 15:52:57 +13:00
Dean 2a5014d896 Merge pull request #8096 from klosixgaming-arch/fix/libc-crash-report-int41-assert
fix(libc): name guest assert/break in Windows crash reports
2026-10-20 15:52:43 +13:00
Dean 463dc2e4e2 Merge pull request #7889 from ErenYeager1836/feat/libSceSysmodule-unload-internal-with-arg
feat(libSceSysmodule): implement sceSysmoduleUnloadModuleInternalWithArg
2026-10-20 15:52:30 +13:00
Dean db9fe52310 Merge pull request #7828 from savvaniss/fix/gpl-off-keep-library-extensions
fix(agc): keep the pipeline library extensions enabled under APS5_NO_GPL
2026-10-20 15:52:17 +13:00