Commit Graph
439 Commits
Author SHA1 Message Date
Adrià 7b7d445bfb Merge pull request #9439 from milescoviello/feat/trace-calls-file
feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
2026-10-25 17:42:50 +01:00
Adrià c661d9fae2 Merge pull request #9133 from fogydes/feat/libSceLibcInternal-posix-spawn
feat(libSceLibcInternal): implement posix_spawn process creation and reaping
2026-10-25 17:38:41 +01:00
Adrià 0a77bbf18c Merge pull request #9170 from rooklz/fix/libc-thrd-id
fix(libc): return the calling thread from _Thrd_id as the console's libc.prx does
2026-10-25 17:34:31 +01:00
Dean 5e675163f0 Merge pull request #9916 from JJenkx/windows/printf-decimal-console
fix(libc): round and cap %e, %f and %g as titles' libc.prx does
2026-10-26 04:45:09 +13:00
Dean 15e1e72a21 Merge pull request #10542 from anizayazcodpro-png/feat/libc-iswascii
feat(libc): implement iswascii
2026-10-26 04:19:25 +13:00
Adrià 1ee8f4bec1 Merge pull request #9181 from Dripl1x/fix/no-resident-write-faults
fix(libc): stop write-protecting resident runs on Windows
2026-10-25 14:26:12 +01:00
fogydes 723d932f73 feat(libSceLibcInternal): implement posix_spawn process creation and reaping 2026-10-25 13:57:17 +01:00
Dean cdcbd55134 Merge pull request #10787 from 00xDisaster/feat/libc-dinkumware-divide
feat(libc): implement _Divide, _FDivide, _Recip and _FRecip
2026-10-26 00:36:31 +13:00
Adrià 35d22d88f9 Merge pull request #9618 from xXPBSXx/fix/output-structs-efault
fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory
2026-10-25 11:52:20 +01:00
anizayazcodpro-png fb99d0bf8c feat(libc): implement iswascii
Implement iswascii in libc, checking whether a wide character falls within the 7-bit ASCII range (0x00 to 0x7F). Add unit test coverage in GuestRuneLocale.
2026-10-25 15:34:22 +05:30
Adrià 16025845e5 Merge pull request #9423 from AliZedan1A/fix/guest-path-efault
fix(kernel): safely copy guest path arguments
2026-10-25 10:48:00 +01:00
Dean d6da8da587 Merge pull request #10765 from 00xDisaster/feat/libc-ldinkumware
feat(libc): implement long-double Dinkumware helpers
2026-10-25 21:50:29 +13:00
ali zedan 2c5fcf6406 fix(kernel): safely copy guest path arguments 2026-10-25 08:28:09 +01:00
MarcZX10 455f7b093c fix(libc): add the year in asctime_s without signed overflow
asctime_s and sceAmprAsctimeS added 1900 to tm_year in int before the range check, so a tm_year near INT_MAX overflowed: UndefinedBehaviorSanitizer reports signed integer overflow at SonyCrt.hpp:91. The year is now computed in 64 bits; the result stays EINVAL with an empty buffer for any year outside 0 to 9999.
2026-10-25 05:25:22 +00:00
Disaster 72583a0b20 feat(libc): implement _Divide, _FDivide, _Recip and _FRecip 2026-10-25 04:20:44 +03:00
Rookie 0297073da2 fix(libc): return the calling thread from _Thrd_id as the console's libc.prx does 2026-10-25 01:45:47 +01:00
milescovielloandClaude Opus 5.5 a938dd8f20 feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
A traced run that ends without a crash or an abort never reports which
imports it called. With APS5_TRACE_CALLS_FILE set, the first traced import
starts a thread that rewrites that file every 10 seconds with every import
called so far, most called first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 00:15:39 +00:00
Disaster 10c2a645a3 feat(libc): implement long-double Dinkumware helpers
Implement _LLog, _LDivide and _LRecip for the PS5 libc surface, with guest coverage for base dispatch, division and reciprocal semantics.
2026-10-25 02:41:03 +03:00
xXPBSXxandClaude Sonnet 5.5 83f28bd67f fix(libkernel): fail the stat family with EFAULT when the output struct is not writable guest memory
fstat, _fstat, sceKernelFstat, stat, lstat, sceKernelStat and _fstatfs
filled the caller's struct in place, or copied into it after a check that
only tests for null, so a pointer into unmapped memory crashed the host.
Fill a local struct and copy it out with a checked write that fails with
EFAULT. FreeBSD 11.4 does the same after the lookup has succeeded:
copyout(&ub, uap->sb) in sys_fstat (sys/kern/kern_descrip.c:1328),
copyout(&sb, uap->ub) in sys_stat (sys/kern/vfs_syscalls.c:2066) and
copyout(sfp, uap->buf) in sys_fstatfs (sys/kern/vfs_syscalls.c:337).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 01:08:01 +02:00
boykopovar 2db4bb590b fix(sdk): restore linux and libc++ header compatibility 2026-10-25 00:02:51 +03:00
boykopovar 2a99f02f25 fix(sdk): reconcile declarations after main rebase 2026-10-24 23:17:50 +03:00
boykopovar 53a65ec210 fix(sdk): sync declarations with latest main 2026-10-24 23:17:48 +03:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
JJenkxandClaude Opus 5.5 182bd6aa78 fix(libc): round and cap %e, %f and %g as titles' libc.prx does
The printf family formatted floating-point conversions through the host,
which prints every exact digit and rounds ties to even. The libc.prx
that titles ship keeps the exact digits only down to a position derived
from the binary exponent and prints zeros after them, rounds half up on
the kept digits, and rounds an exact tie down once that exponent
estimate reaches 8. So %.0f of 2.5 is 3 and %.1f of 0.25 is 0.3 there,
and %.20f of 0.1 is 0.10000000000000000555.

Format finite double and long double e, f and g conversions with those
rules from exactly generated digits, on every host. On 600,000 random
formats every output with up to 17 significant digits now matches the
copies bundled with PPSA07923, PPSA05916 and PPSA13934; longer outputs
still differ where the console's extended-precision digits end one unit
lower.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 16:17:13 -04:00
JJenkx 1a610d2f25 fix(libc): bound hex float allocation by remaining output 2026-10-24 16:14:15 -04:00
JJenkx a8c040004f fix(libc): reject oversized hex float output before allocation 2026-10-24 16:14:15 -04:00
JJenkx e2d2d5171b fix(libc): reject overflowing hex float precision 2026-10-24 16:14:15 -04:00
JJenkxandClaude Opus 5.5 1fbd44b66f fix(libc): format %a like the console on Windows
The Windows printf family handed %a and %A to the host, whose UCRT prints
a subnormal unnormalised (0x0.0000000000001p-1022) and pads with zeros
even when the - flag is given (%-010a of 1.5 gave 0x001.8p+0). The
libc.prx that titles ship normalises subnormals (0x1p-1074), rounds a
shorter precision half up without renormalising a carry, and lets -
override 0, as C requires.

Finite doubles are now formatted here, checked against three titles'
copies of libc.prx run side by side.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 16:14:15 -04:00
Dean 82443ce914 Merge pull request #10223 from orezraey/fix/libc-printf-measured-ps5
fix(libc): format sizes, NaN signs, UTF-16 units, positions and unknown conversions as a PS5 does
2026-10-25 07:34:56 +13:00
Adrià 6b23aaf129 Merge pull request #9159 from EagleBearerYS/fix/agc-rewatched-imports-compared-when-shared
fix(agc): keep a rewatched import's memory compared once it is shared
2026-10-24 20:26:38 +02:00
Dean 845e081537 Merge pull request #9038 from akkadbakkad89/feat/libc-facet-getcat
feat(libc): cover the codecvt, numpunct, num_put and time_put facets, their ids and std::clog
2026-10-25 06:39:27 +13:00
Dean ebdfb92528 Merge pull request #8872 from ycbuzi/feat/libc-siginterrupt
feat(libc): implement siginterrupt through the sigaction libkernel registers
2026-10-25 06:39:00 +13:00
Yunus Shaikh df89dd1041 Merge main into fix/agc-rewatched-imports-compared-when-shared 2026-10-24 09:51:13 -07:00
orezraeyandClaude Opus 5.5 2f99b411af Merge main into fix/libc-printf-measured-ps5
Keep #3987's q, D, O, U, width, '-' and trailing '%' handling for
unknown conversions and fold it into this branch's measured path:
'#' and precision are ignored as measured, '+', space, apostrophe
and '0' with a width still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 13:33:52 -03:00
akkadbakkad89 22957f173e refactor(libc): order codecvt vtable slots like the Dinkumware declaration
alwaysNoconv, maxLength, encoding, in, out, unshift, length matches the MSVC/Dinkumware xlocale declaration order at 0x20-0x50; the generated layout is unchanged because each swapped pair shares one function pointer.
2026-10-24 22:00:40 +05:30
Adrià dca72a82da Merge pull request #3987 from MarcZX10/codex/carry-windows-format-freebsd-3975
fix(libc): match title printf behavior on Windows
2026-10-24 17:59:27 +02:00
akkadbakkad89andDevin 88f209ff93 feat(libc): cover the codecvt, numpunct, num_put and time_put facets, their ids and std::clog
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-24 19:14:58 +05:30
Dean 3eebf30c2e Merge pull request #9945 from p3n1cillin/claude/windows-missing-standard-handles
fix(libc): open NUL on standard descriptors without a stream on Windows
2026-10-24 23:40:27 +13:00
bluandClaude Opus 5.5 e040d1191b Merge branch 'boykopovar:main' into feat/libc-siginterrupt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:49:01 -07:00
MarcZX10 a3e41499be fix(libc): match title printf conversions on Windows 2026-10-24 10:22:15 +02:00
Hussein Kadhim b331e3a86d fix(libc): keep throwing for printf conversions FreeBSD supports but Windows does not
The unknown-conversion branch printed %m, positional arguments, the grouping
flag and modifiers in an unusual order as literal characters. Only characters
FreeBSD's vfprintf prints as themselves are now printed.

(cherry picked from commit 0106858d3d39f83eb2234a5f581d5bf5260521a0)
2026-10-24 10:22:15 +02:00
Hussein Kadhim 621a487bdf fix(libc): print the FreeBSD printf extensions and stray percent signs on Windows
The Windows printf family threw on the q length modifier, the D, O and U
conversions, an unknown conversion character and a format ending in a percent
sign, where FreeBSD's vfprintf formats the first three and prints the unknown
character itself or stops at the end of the format.

(cherry picked from commit 0e3b2896d228c601cefc992b2895723188ebf0fa)
2026-10-24 10:22:15 +02:00
Dean aeeaefad98 Merge pull request #8885 from hypermoist/feat/libc-sce-v2-thread-sync
feat(libc): add the std::__sce_v2 mutex, condition and thread calls
2026-10-24 21:09:55 +13:00
Yunus Shaikh 719a048a1f Merge main into fix/agc-rewatched-imports-compared-when-shared 2026-10-23 23:58:11 -07:00
Dean 376d175996 Merge pull request #10070 from thuanquang/perf/anon-map-commit
perf(libc): carve fresh private guest pages out of their placeholder
2026-10-24 19:54:03 +13:00
Dean Galvin 18b13fbe64 Merge main into 9945 2026-10-24 15:49:35 +13:00
Dean 88d4f1662c Merge pull request #10020 from Queuse/codex/keep-host-diagnostics-unbuffered
fix(libc): isolate host diagnostics from guest buffering
2026-10-24 15:22:01 +13:00
Dean d1d67190a8 Merge pull request #8720 from orezraey/fix/libc-heap-measured-ps5
fix(libc): follow the default heap's alignment, errno and realloc to zero as measured on a PS5
2026-10-24 14:34:38 +13:00
Queuze 897bf2ef6c fix(libc): attach missing standard streams to NUL 2026-10-24 00:51:42 +01:00