Commit Graph
5229 Commits
Author SHA1 Message Date
xxLnolan 30454880de fix(libc): implement PAF mspace memalign 2026-10-19 13:59:05 +02:00
Alex ColliniandClaude Opus 5.5 1d8acd1eda fix(agc): skip a periodic pipeline cache save while a pipeline creation holds the cache
The saver thread took the snapshot lock with a blocking exclusive lock. Behind
a pipeline creation that runs for minutes (an NVIDIA compile of a 1.5M-word
compute pipeline), the queued writer made the shared_mutex hold every later
pipeline creation on every queue until the compile ended. The periodic save now
tries the lock and waits for the next interval when it is busy; SaveNow and the
teardown save still wait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 13:57:50 +02:00
alfalfa-starandClaude Opus 5.5 4be9dfe394 docs(agc): list APS5_NO_SPACE_STAMP_ONCE in the environment table
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 13:55:05 +02:00
Savvanis SpyrosandClaude Opus 5.5 c92f09d1d5 docs(debt): name no title in the SCE code gap entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 14:53:58 +03:00
Nithishvelan M 2165427879 feat(libc): implement std::_Throw_bad_optional_access
PPSA26578 (issue #7624) imports _ZSt26_Throw_bad_optional_accessv (NID
KwzEip7m6TM) from libc, and its bundled libc.prx does not export it,
causing the process to exit with 0xC0000139 (GetLastError: 127).

Implement std::bad_optional_access type record and vtable deriving from
std::exception, thrown through ThrowPlain, with what() returning
"bad_optional_access", and add unit test coverage in ExceptionRuntime.
2026-10-19 17:22:27 +05:30
Dean 6762694735 Merge pull request #7761 from angleboyndn-stack/fix/libc-secure-string-destination-limits
fix(libc): reject oversized secure string destinations
2026-10-20 00:52:00 +13:00
thuanquangandClaude Opus 5.5 01ed9192ed fix(shader): flush v_add_f64 and v_mul_f64 denormals by the f64 field
v_add_f64 and v_mul_f64 ignored the FLOAT_MODE f16/f64 denormal field.
On RDNA2 (gfx1031) bit 6 clear flushes both inputs to a zero of their
sign, and bit 7 clear flushes a sum below 2^-1022 and a product whose
exact value rounded to 53 significant bits with an unbounded exponent
is below 2^-1022. The product test scales one source by 2^64 and
compares the host product with 2^-958.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:49:58 +07:00
ionut27001andClaude Opus 5.5 dca67ae477 fix(libkernel): return kern.rng_pseudo in 64-byte blocks as measured on a PS5
In a payload process on a PS5 (firmware 12.70),
sysctlbyname("kern.rng_pseudo") answers a size query with 64 and gives
at most 64 bytes per call, up to a 65536-byte buffer. A buffer smaller
than 64 bytes gets as many bytes as its length and a null length gets
none, both with -1 and ENOMEM; a null buffer with a null length returns
0, and errno is kept when the call succeeds. Here the whole buffer was
filled, a size query threw and the length was never changed. The 64
random bytes are now drawn only for a read that passes both a buffer
and a length.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 14:49:39 +03:00
Adrià bbb45463c7 Merge pull request #6849 from al3w0f205/feat/audiopropagation-firmware-exports
feat(libSceAudioPropagation): export missing firmware functions from database
2026-10-19 13:46:36 +02:00
Adrià 87aee045df Merge pull request #6821 from JJenkx/fix/point-context-sdk-defaults
fix(agc): initialize point size and limits from SDK defaults
2026-10-19 13:45:12 +02:00
Adrià 2b6c1112b8 Merge pull request #6763 from SP4C3B4R-8/perf/windows-draw-input-copies
perf(agc): copy draw inputs on NVIDIA's Windows driver instead of binding host imports in place
2026-10-19 13:45:06 +02:00
Adrià db73af3506 Merge pull request #6831 from ErenYeager1836/fix/savedata-sync-memory-init-check
fix(libSceSaveData.native): return error for uninitialized sceSaveDataSyncSaveDataMemory
2026-10-19 13:43:56 +02:00
Adrià 77b3edf32a Merge pull request #6841 from Sevthered/feat/ajm-pcm-resample
feat(ajm): resample interleaved s16 PCM through codec 23
2026-10-19 13:38:50 +02:00
Adrià 62e946f114 Merge pull request #6833 from ErenYeager1836/feat/libkernel-sysconf-limits
feat(libkernel): support _SC_ARG_MAX, _SC_OPEN_MAX and _SC_IOV_MAX in sysconf
2026-10-19 13:37:44 +02:00
David f673abe047 docs(debt): record the macOS RLIMIT_NOFILE at load in libkernel.md 2026-10-19 13:35:03 +02:00
thuanquangandClaude Opus 5.5 abea1bc710 fix(shader): flush f64 floor, ceil, fract and frexp denormal inputs
v_floor_f64, v_ceil_f64, v_fract_f64, v_frexp_mant_f64 and
v_frexp_exp_i32_f64 ignored the FLOAT_MODE f16/f64 denormal field. On
RDNA2 (gfx1031) bit 6 clear flushes a denormal input to a zero of its
sign, so v_ceil_f64 of 2^-1074 is 0 instead of 1, and bit 7 clear
flushes the denormal result v_fract_f64 gives for a positive denormal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:34:17 +07:00
xXPBSXxandClaude Sonnet 5.5 0b8c849f55 docs(agc): record the queue 0x20 label wait that holds another slot's address
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:32:36 +02:00
xXPBSXxandClaude Sonnet 5.5 7d5089a7fb docs(debt): record the CMASK clear pass fault on AMD without pipeline libraries
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 13:31:58 +02:00
milescovielloandClaude Opus 5.5 1f63ba35af docs(agc): say where PS_ITER_SAMPLE alone still throws and which memory accesses can differ
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:28:30 +00:00
Adrià 3691f6ffc2 Merge pull request #6826 from hugodearaujo/fix/page-table-stats-console
fix(libkernel): count page-table entries the way the console does
2026-10-19 13:24:22 +02:00
WernerandClaude Opus 5.5 2ac433e3cb feat(libc): list stack return address candidates in the hang dump
The Windows crash report walks every other thread's rbp chain only, so
a thread waiting inside ntdll or in code built without frame pointers
showed no frames at all. For a thread whose chain yields fewer than two
frames, scan the 32 KiB above its rsp while it is suspended and print
up to 24 words that point at executable memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T86KdkUbEv7m5hrCbPbkAp
2026-10-19 13:24:02 +02:00
RengundomandClaude Opus 5.5 88f8184102 fix(trace): write the benchmark file safely and off the presenter
Review of the benchmark report:

- The file is written to `<name>.tmp` and moved over the previous one, so a
  crash or kill during a rewrite keeps the last complete report.
- A dedicated writer keeps only the newest pending snapshot, so two reports
  can no longer be joined into one file when the writer falls behind.
- The report is formatted on the writer thread. The presenter hands over the
  kept intervals, which are shared and never copied, so the interval that
  closes no longer pays for formatting every earlier one.
- Hosts that are not x86 or report no CPU brand string leave the host fields
  out instead of failing every summary line.
- A `contentVersion` that is not a string, or does not fit, is left empty
  instead of failing the title's metadata.
- Tests cover the 240-interval rotation and `intervals_dropped`, the
  newest-only writer, the pending write on stop and the atomic replace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:21:04 -05:00
Adrià f6eeca4f5f Merge pull request #6786 from fdfawef324/claude/agc-indirect-args-stale
fix(agc): wait for address-based writers before reading indirect dispatch arguments
2026-10-19 13:16:24 +02:00
akkadbakkad89 8f3849e791 fix(prx): correct the offline NP WebAPI error code and list silent stubs 2026-10-19 11:16:04 +00:00
Lindamea1andClaude Opus 5.5 d8baccc195 feat(libSceNetCtl): declare sceNetCtlGetInfoV6
libSceNetCtl exports sceNetCtlGetStateV6, sceNetCtlRegisterCallbackV6
and sceNetCtlUnregisterCallbackV6 but not sceNetCtlGetInfoV6 (NID
Jy1EO5GdlcM). Dragon Ball Xenoverse 2 (PPSA08587) imports it, and an
import that no system library exports stops a title before its entry
point: on Linux ld.so refuses the relinked executable with "undefined
symbol: Jy1EO5GdlcM", and on Windows the entry stub prints "FAIL:
unresolved ELF import Jy1EO5GdlcM from libSceNetCtl.prx" and raises
0xC0000139. The title's tester reports that it does not call the
function before its loading screen.

It is a Sony network-control call with no FreeBSD counterpart, and
neither its parameters nor the IPv6 info layout are known, so it is
declared without parameters and throws through
NotImplemented_nid_no_patch, as CONTRIBUTING.md asks of exports that
cannot be implemented. The gap is recorded in
docs/dev/debt/libSceNetCtl.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:07:45 +01:00
Adrià 97d5d7a52a Merge pull request #6737 from fogydes/fix/libkernel-eventflag-deletion-and-multiwaiter-race
fix(libkernel): prevent use-after-free on event flag deletion and multi-waiter race
2026-10-19 13:05:18 +02:00
milescovielloandClaude Opus 5.5 c2764f31f2 fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target
A one-sample depth target under a multisampled rasterizer without
MSAA_ENABLE is drawn as a one-sample draw at the pixel center, but a pixel
program that runs with PS_ITER_SAMPLE threw. Ghost of Tsushima (PPSA02225)
draws its depth-only pass this way (2x PA_SC_AA_CONFIG, PA_SC_MODE_CNTL_1
0x06030000, KILL_ENABLE, no sample index or coverage input) and stops on it.

Every sample is taken to be at the pixel center on this path, so
invocations per sample would get the same inputs and give the same depth,
kill and color results, and the target keeps sample 0's. Such a program is
now drawn once per pixel, without sample shading. ANCILLARY and
SAMPLE_COVERAGE inputs still throw. The debt entry notes that only the
memory writes of such a program can differ.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:05:02 +00:00
milescovielloandClaude Opus 5.5 e8d68f482c docs(libScePlayGo): describe the scenario-only chunk list without naming a title
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 11:04:22 +00:00
MarcZX100 94f035da1f docs(libc): correct timezone interaction note 2026-10-19 13:03:54 +02:00
MarcZX100 89fb0ddb7a docs(libc): note host timezone interaction 2026-10-19 13:03:54 +02:00
MarcZX100 03fbf57208 docs(libc): move timezone debt to its component file 2026-10-19 13:03:54 +02:00
Hussein Kadhim 6b03cf445f fix(libc): serialise guest TZ changes with time conversions
Copy the guest TZ under the guest environment lock so a concurrent setenv
cannot free it while it is read, and hold one lock across the zone switch
and the conversion so the fields of two zones are never mixed. Document the
host rejection, Windows zone name and stale tm_zone limits.
2026-10-19 13:03:54 +02:00
Hussein Kadhim 7d1140d962 fix(libc): apply the guest TZ to tzset, localtime, mktime and strftime
Guest setenv, putenv and unsetenv only change the guest environment, while
the time conversions read the host TZ, so a guest that set TZ and called
tzset still got host local time. Copy a changed guest TZ to the host before
each local conversion and call tzset again.
2026-10-19 13:03:54 +02:00
Lindamea1andClaude Opus 5.5 4faf57a986 feat(libs): add the Voice and IME exports PPSA24191 needs to load
Monster Hunter Wilds imports sceVoicePausePort, sceVoiceResumePort and
sceImeSetConsecutiveClauseConversionEnabled, which no library exported,
so the loader stopped at the first of them.

sceVoicePausePort and sceVoiceResumePort check the library and the port
like sceVoiceResetPort. sceImeSetConsecutiveClauseConversionEnabled has
no public reference and throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:01:08 +01:00
Adrià Franch 45d012ed3d docs(agc): merge the storage write-back debt lines and state what the hold counters report 2026-10-19 12:57:59 +02:00
umangandClaude Opus 5.5 a56ca27514 docs(agc): list APS5_NO_QUEUED_DRAW_READ_ORDER in the environment reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 00053a3f60 fix(agc): hold queued draws' vertex and DMA source reads and retry the stores they refused
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
umangandClaude Opus 5.5 c9af5d9f4b fix: order deferred write-backs after queued draws' index reads
A pipelined draw read its index buffer from guest memory at commit time,
after the packets behind it had run, so a later dispatch's deferred
storage-image write-back could land in the bytes first. Stellar Blade
recycles its full-screen quad's index buffer for a 66x66 image when the
menu loads, and aborted with "vertex fetch exceeds descriptor record count".
Deferred write-backs now wait while a queued draw still holds a read of the
range. APS5_NO_QUEUED_DRAW_READ_ORDER=1 restores the old order; [draw]
reports held read ranges and stores.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:57:48 +02:00
Zinebyte f4d68f2883 docs(libkernel): clarify remaining sleep cancellation debt 2026-10-19 12:57:26 +02:00
Dean f72c7aacfa Merge pull request #7506 from cadenasynyster/fix/libc-throw-bad-variant-access
feat(libc): implement std::__throw_bad_variant_access
2026-10-19 23:54:48 +13:00
Adrià 0fa6ddb137 Merge pull request #6802 from DavidSamir/feat/relinker-macos-fixed-base
feat(relinker): place macOS executables at a fixed base with --macos-fixed-base
2026-10-19 12:54:31 +02:00
Adrià 572130c764 Merge pull request #6767 from DavidSamir/fix/shader-interpolation-without-float64
fix(shader): interpolate 16-bit values with 64-bit integers on devices without Float64
2026-10-19 12:54:25 +02:00
simonbronkandClaude Opus 5.5 7563b4a480 fix(agc): replace with a stencil operation value the pixel shader exports
With DB_SHADER_CONTROL.STENCIL_OP_VAL_EXPORT_ENABLE the pixel shader
supplies the value that REPLACE_OP and the add and subtract operations
use in place of DB_STENCILREFMASK.STENCILOPVAL. The bit was refused as a
whole, which stopped Onimusha: Way of the Sword (PPSA27836) at a
DB_SHADER_CONTROL 0x45 draw with DB_STENCIL_CONTROL 0x40040 (REPLACE_OP
on depth pass, both faces), write mask 0xff and compare ALWAYS.

The export is accepted with the 32_GR and 32_ABGR Z formats. When no
reachable operation through a non-zero write mask reads the value, it
cannot change the result and is ignored. Without a test value export, a
reachable REPLACE_OP becomes REPLACE with the exported value as
FragStencilRefEXT (or the bounded replay on devices without the
extension), provided both faces compare without the test value and use
no ONES or REPLACE_TEST; early tests throw. The add and subtract
operations, and REPLACE_OP with a test value export, still throw.

The value is read from bits 8-15 of the second MRTZ channel: the
title's pixel shader shifts it left by 8 right before exp mrtz
(v_lshlrev_b32 v0, 8, v0). That is the only evidence for the layout and
it is listed as technical debt. The pixel stage info carries the new
flag into the cache key, the draw keys and request serialization
version 31.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 12:53:13 +02:00
Dean 7f6ef06348 Merge pull request #7813 from whamre/fix/windows-stdio-stream-limit
fix(libkernel): raise the Windows stdio stream limit to RLIMIT_NOFILE
2026-10-19 23:52:59 +13:00
Dean 95d08209cd Merge pull request #7779 from Antifrag/codex/http-cache-flush
fix(libSceHttp): add authentication and cookie cache flush exports
2026-10-19 23:52:45 +13:00
Dean efbca95809 Merge pull request #7824 from Rajkamalcode/fix/windows-kernel-sys-link-cleanup
test(libkernel_sys): remove links and the fixture without std::filesystem on Windows
2026-10-19 23:52:32 +13:00
Adrià 448aa33eb1 Merge pull request #6787 from al3w0f205/feat/keyboard-missing-firmware-exports
feat(libSceKeyboard): export missing firmware functions from database
2026-10-19 12:52:14 +02:00
SibteProf f9d6f3e932 feat(libSceCesCs): implement Unicode scalar conversions 2026-10-19 15:46:11 +05:00
Adrià 9d2d40f5ee Merge pull request #6714 from fogydes/feat/agc-cb-mem-semaphore
feat(libSceAgc): implement CB memory semaphore and unversioned payload address
2026-10-19 12:42:50 +02:00
KernelPanicNTandClaude Opus 5.5 1fbbad7c55 fix(libSceUserService): check the thread priority on initialization
sceUserServiceInitialize reads the thread priority from the first int
of its parameters, and sceUserServiceInitialize2 takes it as its
argument. A PS5 returns 0x80960005 for a priority outside 0x100 to
0x2FF, and 0x80960003 when Initialize2 is called on an initialized
service, where this returned success.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 10:37:19 +00:00