Commit Graph
20967 Commits
Author SHA1 Message Date
Yossi Yadgar 92f760c461 test(libkernel_sys): cover the default stack size and scePthreadSetName 2026-10-21 20:24:13 +03:00
Yossi Yadgar 9c4943eec0 feat(libkernel_sys): implement pthread_set_defaultstacksize_np, scePthreadSetDefaultstacksize and scePthreadSetName 2026-10-21 20:24:13 +03:00
Yossi Yadgar bc09ce3128 feat(libkernel): keep the default thread stack size in one settable place 2026-10-21 20:24:13 +03:00
Kovalev Vladislav da1d9407ed fix(tools): bound total SELF alignment padding 2026-10-21 23:23:52 +06:00
Dean 99844c7eef Merge pull request #8762 from JJenkx/fix/sparse-heap-existing-import
fix(agc): prefer imported prefixes before sparse heap mirrors
2026-10-22 06:22:49 +13:00
klosixgaming-arch 64675a3756 fix(shader): require the phi arm table offset to dominate the table read
When a table column pointer is read through a phi, the offset taken from
one arm is substituted into the image handle after the merge. An offset
computed inside an arm does not dominate that use, so planning now refuses
it instead of producing an invalid module.

Adds a case where each arm computes its own offset; it plans as a table on
the previous head and is refused with this change.

AI-assisted: yes. Written with AI assistance and reviewed by me.
2026-10-21 17:22:39 +00:00
Bram910 99493bb590 fix(relinker): validate programmatic patch widths 2026-10-21 19:21:19 +02:00
Dean Galvin 58ad4eda77 fix(libkernel): report app0 symlinks as their target type in getdirentries
On Linux sceKernelGetdirentries copied the host d_type, so a directory under app0 that is a host symlink was listed as a link, and a title that only descends into directory entries skipped it. Inside the app0 tree, report a symlink (or an entry of unknown type) as the type of its target; links elsewhere, and dangling links, stay links.
2026-10-22 06:20:04 +13:00
Dean 4ec064d29b Merge pull request #6887 from Amoenus/codex/test-msaa-reader-retile-main143
test(agc): connect MSAA sample readback to tiled layouts
2026-10-22 06:14:29 +13:00
al3w0f205 5998ff889d test(libSceUserService): cover sceUserServiceGetUserNumber and sceUserServiceGetPlatformPrivacyWs1 2026-10-21 12:14:24 -05:00
thuanquangandClaude 73c9c2a762 test(shader): reject misaligned and partial V# slices of a table call's s_load_dwordx8
Co-Authored-By: Claude <[email protected]>
2026-10-22 00:13:44 +07:00
thuanquangandClaude 01e7d158b6 fix(shader): link a table call whose V# is a slice of an s_load_dwordx8 or s_load_dwordx16
Co-Authored-By: Claude <[email protected]>
2026-10-22 00:13:39 +07:00
David 17650eed5f docs(debt): record that libkernel_sys pselect swaps the mask apart from the wait 2026-10-21 18:06:07 +01:00
David 360206e6db test(libkernel_sys): cover pselect timeouts, readiness, errors and the signal mask 2026-10-21 18:06:06 +01:00
David 121dc64d11 feat(libkernel_sys): implement pselect over select 2026-10-21 18:06:06 +01:00
milescovielloandClaude Opus 5.5 5360173da5 fix(libkernel): keep the thread stack maps alive through static destruction
liveStacks, protectedStackPages and guestStackMappings were plain
globals, so libkernel's static destructors freed them at exit while
detached threads could still unregister their stacks or look one up.
ThreadSanitizer reports the race in guest_pthread_join_detach: the main
thread's static destruction of liveStacks against a detached thread's
UnregisterStack under stackLock. The maps are now created once and
never destroyed, as Apr.cpp does for its globals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 17:05:38 +00:00
ShinMalphur f923ebb200 docs(net): state measured parser compatibility gaps 2026-10-21 23:29:59 +06:30
ShinMalphur d5e2042c5b test(net): cover measured decoding and safe short inputs 2026-10-21 23:28:55 +06:30
ShinMalphur 89da7e6c0a fix(net): follow measured PS5 Ethernet pair decoding 2026-10-21 23:26:44 +06:30
Kraken 65920e6fdc test(libc): cover CRT exit and TLS cleanup lifecycle 2026-10-21 17:56:28 +01:00
ShinMalphur b1ccca5cf7 Merge branch 'main' into feat/net-ether-address-parser 2026-10-21 23:24:11 +06:30
emirplus b7c5dd03fd fix(tools): handle unwritable seed output and reconfigure streams in configure_seed 2026-10-21 19:53:43 +03:00
xXPBSXxandClaude Sonnet 5.5 06ca8ffb7f docs(debt): record the storage image refusal over uncommitted guest memory
StorageTexture throws when none of an image's guest pages is committed.
Three titles reach it intermittently in runs of a few minutes, on AMD and
NVIDIA, and the log names no address. The entry states the gap and that
the console behavior for such a descriptor is not known.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 18:53:39 +02:00
MarcZX10 c566d31d1f test(agc): skip reimport bench below host budget 2026-10-21 16:53:05 +00:00
Dean d34da5d694 Merge pull request #7725 from milescoviello/fix/stencil-known-replace
fix(agc): draw a stencil replacement against a known stencil value as an inversion
2026-10-22 05:49:29 +13:00
emirplus b85e8f9e15 fix(tools): read CMakeCache, graph and changed list with utf-8-sig in select_tests 2026-10-21 19:48:31 +03:00
MarcZX10 349a25f7ff fix(agc): remove stale trimmed-import call 2026-10-21 16:42:05 +00:00
MarcZX10 fa8115ce63 test(agc): assert whole import retires on middle unmap 2026-10-21 16:42:05 +00:00
MarcZX10 2a12152f2b test(agc): clarify imports after partial unmap 2026-10-21 16:42:05 +00:00
MarcZX10 787a7bc39d fix(agc): retire imports after dropping cached address spaces 2026-10-21 16:42:05 +00:00
MarcZX10 a9b14023dd fix(agc): retire host imports before range cuts 2026-10-21 16:42:05 +00:00
Emanueleandmugurc bfa5368657 fix(libkernel): report unwind information for guest and host addresses on macOS
Two unwind queries a title makes went wrong on macOS, so a C++ exception the title would catch ended the process instead: God of War Sons of Sparta (PPSA28997) stops on an IL2CPP exception it normally handles.

- sceKernelGetModuleInfoForUnwind found a relinked image and its PT_GNU_EH_FRAME header but left eh_frame_addr and eh_frame_size at zero, so the title's unwinder found no FDE for its own frame. The tables are now read with EhFrame::ReadTables over the image's load segments, as ModuleInfo does on Linux, and eh_frame_size includes the zero terminator, as on Linux.
- sceSysmoduleGetModuleInfoForUnwind read /proc/self/maps outside Windows and threw on every call on macOS. It now answers from mach_vm_region, with the image path from dladdr, as the Linux branch answers from the mapping.

guest_unwind_module_info now runs on macOS: the test executable carries the __APS5DATA,__meta program headers that the macOS dl_iterate_phdr reads from a relinked image. guest_sysmodule checks the macOS answers against mach_vm_region.

Co-authored-by: mugurc <[email protected]>
2026-10-21 18:39:48 +02:00
emirplus ea51b1191f fix(tests): limit tool availability skip to argument-free discovery in shader cache test 2026-10-21 19:37:31 +03:00
emirplus c2c9aa75b8 fix(tests): guard main and provide defaults in shader cache sources test 2026-10-21 19:36:45 +03:00
emirplus 486eb18dc1 fix(tools): restrict pull request URL matching to current repository in pr_overlap 2026-10-21 19:36:15 +03:00
milescovielloandClaude Opus 5.5 90e0781dcc test(agc): return a zero cancelling coordinate before taking its exponent
The interpolation modes test rounds a generated value to half precision
with std::ilogb(value) - 10. For a zero value std::ilogb returns
FP_ILOGB0 (INT_MIN on Linux), so the subtraction overflows: UBSan reports
a signed integer overflow in agc_driver_interpolation_modes. A zero is
already a half value, so it is returned as is, as the wrapped result
gave.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:35:13 +00:00
MarcZX10 c443b512c2 docs(agc): describe label trace packet coverage 2026-10-21 16:33:58 +00:00
emirplus 1e01841072 fix(tools): recognize markdown links and pull request URLs in pr_overlap dependencies 2026-10-21 19:33:33 +03:00
milescovielloandClaude Opus 5.5 1f87b51ea5 fix(agc): value-initialize a pipeline journal entry before decoding it
parse() declared each LoadedEntry without an initializer. Several State
members (hasColorTarget, topology, viewport, negativeOneToOne, cullMode,
frontFace, blend) have no default member initializer, so the graphics
recipe of a compute record, which is never decoded, held indeterminate
values. Moving the entry into the loaded list then read them: UBSan
reports "load of value 6, which is not a valid value for type 'bool'"
in State's move constructor in agc_driver_pipeline_journal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:32:20 +00:00
PacukaandClaude Opus 5.5 adca8cfa2f fix(shader): accept 3D image stores on 2D-array T#s
A 3D image_store bound to a 2D-array T# addresses the layer as z. Add a 2D-array runtime mode for write-only 3D storage images and drop stores whose layer is past the array.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:31:33 +02:00
xXPBSXxandClaude Sonnet 5.5 f486747523 test(libkernel): hook __readlink_chk in the shared-memory descriptor reuse test
The test replaces readlink to swap a descriptor at the probe. SharedMemory.cpp
calls readlink with a buffer of known size, which GCC turns into
__readlink_chk when it cannot prove the length; the AddressSanitizer build
does that, so the replacement never ran and scenarios 6 to 17 failed with
"descriptor replacement did not run". Forward __readlink_chk to the same
replacement.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 18:26:38 +02:00
Get-fix 6f3e4a147f fix(relinker): read guest TLS relocations against the module's own section symbol
Limbo's bundled libSceFios2.prx (CUSA01664) has DTPMOD64 relocations
against a local section symbol with section index 0 and value 0, in a
module without section headers. As for a TLS relocation without a
symbol, the module and offset are the module's own TLS block, so a
DTPMOD64 or DTPOFF64 against such a symbol is passed on without it. A
section symbol that names a section or has a value, a TPOFF64, a module
without PT_TLS and a DTPMOD64 with an addend still fail.
2026-10-21 19:19:07 +03:00
felekandClaude Opus 5.5 a1ce9acb35 test(shader): check that the _a compare gathers canonicalize S# dword 3
image_gather4_c_a and image_gather4_c_o_a compile when the S# dword 3
holds only a ballot in its reserved bits, like image_sample_a, while
image_gather4_c and image_gather4_c_o with the same S# still refuse it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-21 21:46:43 +05:30
felekandClaude Opus 5.5 13982e0c71 feat(shader): decode MIMG opcodes 0xc8 and 0xd8 as image_gather4_c_a and image_gather4_c_o_a
Death Stranding 2 (PPSA02015) registers shaders with both and stops on
0xc8 ("unsupported MIMG opcode 0xc8"). LLVM's gfx1030 disassembler reads
the same words with bit 0 clear as image_gather4_c and image_gather4_c_o,
and the _a rows already in the table are the base opcode plus 0x80 with the
adjust flag, so both reuse the existing compare gathers with the adjust
flag set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BywPXoZACVi8ALV4JKvuPZ
2026-10-21 21:46:43 +05:30
milescovielloandClaude Opus 5.5 ac9fd36cf0 fix(libc): start sceLibcBacktraceSelf's frames at its caller
CaptureFrames dropped the first two captured addresses, taking them to
be its own frame and the export's. A frame the unwinder adds in between
shifts that: in an ANYPS5_ENABLE_ASAN build the sanitizer's backtrace
interceptor is one, so the first record was the export in libc.prx and
guest_backtrace failed with "first frame is not in the calling module".

The exports now pass their own return address, and the records start at
the captured address equal to it. When no captured address matches, the
first two are dropped as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:13:11 +00:00
JJenkx ba09143027 fix(tools): list controller buttons in chord input help 2026-10-21 12:10:51 -04:00
milescovielloandClaude Opus 5.5 63d39623e3 fix(build): run guest_unused_import_dependencies without the ASan link order check
The test loads guest_module_args_host into a relinked guest, so in an
ANYPS5_ENABLE_ASAN build the ASan runtime is not first in the initial
library list and the guest stops before it runs. The other relinker
tests that load that host already take verify_asan_link_order=0
through add_asan_test_options; this one was added after them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:09:50 +00:00
milescovielloandClaude Opus 5.5 01987e4b41 test(agc): give the draw snapshot table set test texels for its whole surface
The 4x4 32-bit linear T# in drawSnapshotTableSetTests describes a
surface with a 64-texel pitch, 1024 bytes, but the test backed it with
64 bytes. Building the image tables reads the whole surface, so the test
read 960 bytes past its array: an ASan build reports a
global-buffer-overflow in agc_draw_descriptors. Size the texels as the
next test does and require that the surface fits them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:04:26 +00:00
Nixitov 5aa33fe271 feat(libScePosixForWebKit): export pthread_setname_np
AI-assisted: yes
2026-10-21 18:04:13 +02:00
Nixitov 4bd46aa9ef feat(libSceVideodec2): declare sceVideodec2InitLibrary
AI-assisted: yes
2026-10-21 18:01:44 +02:00