Commit Graph
14017 Commits
Author SHA1 Message Date
MrMha 26c3a82e8d fix(conventions): ignore non-code duplicate export matches 2026-10-17 18:08:43 +04:00
pushkarreddyy 7bb76080c6 fix(libkernel): return EFAULT from truncate, utimes, mkdir, rmdir, and rename for a null path 2026-10-17 19:34:28 +05:30
MarcZX100 38ed5aa701 docs(usage): explain unlisted PlayGo chunk choices 2026-10-17 14:02:26 +00:00
MrMha 8eecd50600 fix: exclude test export aliases from import audit classification 2026-10-17 18:01:02 +04:00
mattogepetoandClaude Opus 5.5 a6c123ca4a fix(libkernel): return EPROTOTYPE for a socket type inet does not have
socket() returned EPROTONOSUPPORT for every socket type it does not create.
FreeBSD 11.4's socreate returns EPROTOTYPE when no protocol is found, the
protocol is 0 and the type is not 0, and EPROTONOSUPPORT when a protocol was
given. Its inet domain (in_proto.c) has SOCK_RAW entries in every kernel and
a SOCK_SEQPACKET entry only with SCTP, and no SOCK_RDM or other type.

Return EPROTOTYPE for a type the inet domain never has, such as SOCK_RDM,
with protocol 0. SOCK_RAW and SOCK_SEQPACKET keep EPROTONOSUPPORT, since
whether the console creates them is not known. Test the unknown types and
mismatched protocols for AF_INET and AF_INET6, and list the socket types and
families that are not created in the library's technical debt file.

Written with AI assistance (Claude).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:00:45 +02:00
MrMha 9834a9f851 fix: reject library archive file and directory conflicts 2026-10-17 17:59:40 +04:00
milescovielloandClaude Opus 5.5 1c9d9d6bc5 fix(build): run the CPU-side tests in an ANYPS5_ENABLE_ASAN build
Under -DANYPS5_ENABLE_ASAN=ON with ASAN_OPTIONS=detect_leaks=0, 14 of
the 849 tests outside the AGC driver, shader and VideoOut suites failed
on main for reasons that come from the ASan build itself, not from the
code they test:

- libc copies the main executable's file-backed writable pages before
  remapping them anonymously. In an instrumented test executable those
  pages hold ASan's redzones around globals, so the memcpy reported a
  global-buffer-overflow at load (patched_libraries,
  guest_memory_lifetime). The ASan build copies the pages word by word
  without instrumentation.
- Five tests check that a local variable is on the thread's stack.
  With detect_stack_use_after_return, which is on by default on Linux,
  instrumented locals live on ASan's fake stack. These tests now run
  with it off. guest_kernel_is_stack also bounded the worker stack by
  the application area without the ASan build's arena offset.
- The relinker module tests and loadexec_arguments load instrumented
  libraries into a Python process or a relinked guest, so the ASan
  runtime is not first in the initial library list. They now run with
  verify_asan_link_order=0. Preloading libasan instead put its
  __cxa_throw interceptor ahead of libc.prx's and broke the unwind of
  an exception that LoadExec throws and catches.
- guest_allocator_failures limits RLIMIT_DATA to 128 MiB and then
  commits 300 GiB. ASan maps 37.5 GiB of shadow for that commit, which
  the limit refuses, and aborts. The ASan build skips that section.
- fiber checks the address of a local against the fiber's context too,
  so it runs without fake stacks as well. Its CheckActiveContext then
  reads the fiber stack word by word above that local, through the
  redzones of the frames on that stack, and is no longer instrumented.
- agc_multisample_guest_access passed aligned_alloc a size that is not
  a multiple of the alignment, which C11 does not allow and ASan
  rejects. It now rounds the size up.

add_asan_test_options appends to ASAN_OPTIONS for one test in an ASan
build and does nothing otherwise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:55:21 +00:00
pushkarreddyy 372705c8d0 fix(tools): accept top-level event arrays and empty documents in trace_digest 2026-10-17 19:18:07 +05:30
Ondra97 256da9617c fix(agc): release unpublished descriptor cache objects 2026-10-17 15:41:44 +02:00
Dextroid17 507032298f test(agc): count mock Vulkan objects atomically 2026-10-17 09:40:55 -04:00
lakhantheboss 0936fe9b53 fix(savedata): return parameter error on null arguments in getMountInfo and getParam 2026-10-17 19:07:36 +05:30
mattogepetoandClaude Sonnet 5.5 9dc6542999 fix(libkernel): report EINVAL for getdirentries on a non-directory
sceKernelGetdirentries on a descriptor that is not a directory returned
ENOTDIR from the host getdents64 on Linux, and ENOTDIR for every descriptor
missing from the directory table on Windows, including invalid ones.
FreeBSD 11.4's kern_getdirentries returns EINVAL when the vnode is not a
directory.

Return EINVAL for a regular file on both hosts and EBADF for an invalid
descriptor on Windows. Test getdents and getdirentries on a regular file and
list the pipe case, which still fails with ESPIPE on Linux, in the library's
technical debt file.

Written with AI assistance (Claude).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-17 15:37:23 +02:00
mattogepetoandClaude Sonnet 5.5 c17c6a5114 fix(libkernel): return EFAULT from clock_gettime for a null result pointer
clock_gettime threw invalid_argument when the result pointer was null,
before looking at the clock id. FreeBSD 11.4's sys_clock_gettime reads the
clock through kern_clock_gettime, which fails with EINVAL for an unknown
clock, and only then copies the result out, so a null pointer fails with
EFAULT.

Read the clock into a local value first, then fail with -1 and EFAULT when
the pointer is null. A clock that is not supported still throws before the
pointer is looked at. Test the null pointer for the supported clocks.

Written with AI assistance (Claude).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-17 15:33:47 +02:00
javierUDP b38f146ce6 docs(relinker): record what Rosetta executes on an M5
The Rosetta conversion limits were measured on an M1 running macOS 15.3.1
and an M5 Max. A survey on an M5 running macOS 26.4 executes ANDN, RDRAND,
the rest of BMI1 and BMI2, LZCNT, PREFETCHW, CLFLUSHOPT, AVX, AVX2, FMA,
F16C and MOVBE while CPUID reports none of them, and raises an illegal
instruction for RDSEED, CLWB, RDPID, ADCX and ADOX.
2026-10-17 10:31:23 -03:00
javierUDP 02c7da7677 fix: keep the Python tools and tests on Python 3.9
`Path.write_text(newline=...)` and `zip(strict=True)` were added in
Python 3.10. macOS ships 3.9.6 as /usr/bin/python3, the interpreter CMake
finds when no newer one is installed, so `prepare_release_notes` raised
TypeError when the release workflow wrote its notes and the
`pr_overlap_tools`, `release_package` and `linux_fixed_base` tests failed
on a stock macOS host. Writing the encoded text keeps the newline
translation off on every host, and the dynamic tag counts are compared
before the pairs are walked.
2026-10-17 10:31:10 -03:00
Dean 47a266cf97 Merge pull request #7127 from tibzejoker/fix/cache-file-write-over-2gib-v2
fix(shader): write cache files of 2 GiB and more in chunks
2026-10-18 02:28:50 +13:00
Dean 32d6dc4dc3 Merge pull request #7126 from YossiYad/fix/f16-interpolation-without-barycentrics
fix(shader): take 16-bit interpolation to the barycentric emulation without the extension
2026-10-18 02:28:01 +13:00
MarcZX100 55497ed3a4 fix(relinker): omit RELRO when lazy binding 2026-10-17 13:27:03 +00:00
Dean ec76af441a Merge pull request #7125 from pushkarreddyy/feat/libs-yakuza-0-rudp-signaling-imports
feat(libs): declare missing RUDP and signaling imports for PPSA31327
2026-10-18 02:27:02 +13:00
Dean 1fcfc267af Merge pull request #7128 from Pouare514/fix/import-audit-host-deps
fix(tools): walk host-to-host .prx dependencies of built libs in import audit
2026-10-18 02:26:04 +13:00
MarcZX100 09bc5a1799 fix(relinker): preserve GNU stack and RELRO headers on Linux 2026-10-17 13:25:43 +00:00
Dean 042ec94a60 Merge pull request #6569 from MarcZX100/codex/pr-6564-mouse-read-pad-guard
fix(videoout): separate title mouse input from pad bindings
2026-10-18 02:25:04 +13:00
Dean 21a0672ab2 Merge pull request #7122 from Th3Gold3nRainbow/feat/libSceContentDelete
feat(libSceContentDelete): add sceContentDeleteById and sceContentDeleteByPath
2026-10-18 02:24:09 +13:00
Dean 4827f36cb5 Merge pull request #7029 from milescoviello/fix/condattr-setclock-einval
fix(libkernel): return EINVAL from scePthreadCondattrSetclock and Destroy for a null attribute
2026-10-18 02:22:59 +13:00
milescovielloandClaude Opus 5.5 9c9311af8f test(libSceNet): set TCP_NODELAY on a libkernel socket through sceNetSetsockopt
The call MXGP 26 makes; libkernel answers it since #5565.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:22:34 +00:00
milescovielloandClaude Opus 5.5 3573289f2f fix(libSceNet): set an option on a libkernel socket through sceNetSetsockopt
MXGP 26 (PPSA30839) opens TCP sockets with libkernel's socket() and
turns on TCP_NODELAY with sceNetSetsockopt. libSceNet only looked in its
own socket table, so the call failed with SCE_NET_ERROR_EBADF. On the
console both calls work on the same kernel sockets.

A descriptor libSceNet does not own but libkernel has open as a socket
now goes to libkernel's setsockopt(), which answers the options it
models. Anything else still fails with EBADF. The fallback runs after
g_mutex is released.

guest_sce_net sets SO_SNDBUF on a libkernel TCP socket through
sceNetSetsockopt, and checks that the call fails with EBADF once the
socket is closed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:22:34 +00:00
Dean af1e3ae904 Merge pull request #6641 from EagleBearerYS/fix/agc-shutdown-pool-threads
fix(agc): stop and join the driver's thread pools at shutdown
2026-10-18 02:22:13 +13:00
Alexej Szpevák acad67d946 feat(libkernel): poll descriptors 0 to 2 with the console model select uses
select takes descriptors 0 to 2 as a console title's terminal with no input: 0 is never readable and 1 and 2 are always writable. poll threw for them unless the host happened to attach a pipe, so the same title could select on its standard streams but not poll them. poll now gives the same answer, with POLLOUT, the one bit ttydev_poll reports for a writable terminal, for 1 and 2 and nothing for 0.
2026-10-17 15:21:34 +02:00
Alexej Szpevák 35f7466e50 fix(libkernel): answer select on files and the random device as FreeBSD's poll routines do
selscan asks a descriptor once, with the flags of every set it is in (POLLRDNORM for the read set, POLLWRNORM for the write set, POLLRDBAND for the exception set, plus POLLHUP and POLLERR), and marks each set whose flags the answer shares. A seeded random device's randomdev_poll narrows a request with POLLRDNORM to that bit and returns any other request whole, so in the read set it is readable and in no other set, and otherwise it is in each write and exception set it was asked in; select reported it readable and writable together and never exceptional. A regular file or directory went to the host poll, which on Windows threw; vop_stdpoll makes it readable and writable and never exceptional, which select now answers in process on every host, as poll does.
2026-10-17 15:21:34 +02:00
Dean 40315fcf8c Merge pull request #7102 from XairRrR/feat/pad-input-touchpad-halves
feat(pad): touch the left or right touchpad half from the input command file
2026-10-18 02:20:20 +13:00
Dean fbcaec0a5d Merge pull request #6559 from Bonjourcestmatt/fix/sysmodule-unknown-id-coverage
fix(libSceSysmodule): test and document unknown module ids
2026-10-18 02:19:42 +13:00
Ori ShamirandClaude Opus 5.5 ff4ecc6ee3 test(agc): order the late interrupt's commit after queue 0 waits
The test relied on queue 0 reaching its idle wait before the draw
pipeline committed the end-of-pipe label. It now forces that order: a
first submission runs the dispatch and leaves its batch unreaped
(APS5_NO_OPPORTUNISTIC_REAP), queue 0 must be waiting, then the label
is submitted while the test holds the GPU mutex, so the pipeline commits
it only after queue 0 handed it over and waits again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 16:19:04 +03:00
Dean 36c69d5cc6 Merge pull request #6377 from voidlakhan/fix/web-converter-change-input-reset
fix(web): reset interface state and input values on change input
2026-10-18 02:18:44 +13:00
Alexej Szpevák 03ae66bea4 feat(libkernel): poll the random device as randomdev_poll does
poll threw for /dev/random and /dev/urandom, which select already treats as ready. FreeBSD 11.4's randomdev_poll, once the device is seeded, narrows a request that has POLLIN or POLLRDNORM to those bits and returns any other request whole, POLLOUT and the band bits included. poll now answers that, and the test that relied on the random device throwing uses a kqueue descriptor, which poll still does not support.
2026-10-17 15:18:34 +02:00
Alexej Szpevák 147d58cf9a feat(libkernel): poll regular files and directories as vop_stdpoll does
poll threw for any descriptor that is neither a socket nor a pipe, so a title polling a file it also reads stopped there. FreeBSD 11.4 hands a vnode to VOP_POLL, and both vop_stdpoll and vop_nopoll return POLLIN, POLLRDNORM and POLLOUT of the requested events for every event poll accepts and never POLLPRI, POLLRDBAND or POLLWRBAND. A file, a directory or a file read from app0.zar now answers that without a host call. File::IsVnode tells such a descriptor apart from the host file type without throwing, so a host socket lent by libSceNet still reaches its own path.
2026-10-17 15:18:34 +02:00
Dean 8b84df66b1 Merge pull request #6441 from al3w0f205/fix/unwrap-self-zero-size-segments
fix(tools): allow unwrap_self to place zero-size segments without a PT_LOAD host
2026-10-18 02:17:56 +13:00
Dean 23f142350d Merge pull request #6886 from alexpournaras/fix/net-so-onesbcast
fix(libSceNet): store SO_ONESBCAST in sceNetSetsockopt
2026-10-18 02:17:03 +13:00
Dean 412d520e1c Merge pull request #6961 from savvaniss/fix/select-tests-junction
test(tools): build the select_tests fixture under a junction where Windows refuses symlinks
2026-10-18 02:16:19 +13:00
Dean 94e67bd135 Merge pull request #6433 from MrMha/fix/oracle-output-freshness-20261015
fix: require fresh exact-size output for every oracle dispatch
2026-10-18 02:15:39 +13:00
Dean 2201c8e684 Merge pull request #6432 from MrMha/fix/import-reference-strength-20261015
fix: preserve strong references when grouping duplicate imports
2026-10-18 02:14:33 +13:00
Lberonio 2aa6bfca62 fix(agc): suppress the flip end-of-pipe event on queues that raise release interrupts 2026-10-17 16:14:18 +03:00
Dean e679bab919 Merge pull request #6431 from MrMha/fix/registry-weak-booleans-20261015
fix: require boolean weak flags in import registries
2026-10-18 02:13:36 +13:00
Dean 3a26ce271d Merge pull request #6430 from MrMha/fix/trace-markdown-cells-20261015
fix: escape trace names in Markdown table cells
2026-10-18 02:12:55 +13:00
Dean 1efeb942b9 Merge pull request #6429 from MrMha/fix/trace-list-limits-20261015
fix: reject negative trace digest list limits
2026-10-18 02:12:17 +13:00
pushkarreddyy 274f092e70 fix(libkernel): return EFAULT from sceKernelStat and sceKernelUnlink for a null path 2026-10-17 18:41:29 +05:30
Dean 51b788ccb4 Merge pull request #6428 from MrMha/fix/trace-stack-weights-20261015
fix: reject invalid collapsed stack sample weights
2026-10-18 02:11:19 +13:00
Dean b5e2f73507 Merge pull request #6427 from MrMha/fix/ctest-configuration-disabled-20261015
fix: retain enabled CTest registrations across configurations
2026-10-18 02:10:33 +13:00
Dean 04788b0902 Merge pull request #6426 from MrMha/fix/compile-fragment-preservation-20261015
fix: suppress Clang compilation fragments during syntax checks
2026-10-18 02:09:30 +13:00
Dean aa6424184a Merge pull request #6425 from MrMha/fix/web-expanded-archive-limit-20261015
fix: bound expanded library archives before CRC validation
2026-10-18 02:08:46 +13:00
Dean 0361f5d54f Merge pull request #6424 from MrMha/fix/release-notes-aliases-20261015
fix: reject aliased release note input and outputs
2026-10-18 02:08:02 +13:00