Commit Graph
652 Commits
Author SHA1 Message Date
Disaster ca84349a42 feat(libc): implement _Thrd_lt 2026-10-25 03:45:02 +03:00
Dean Galvin 1616abc519 Merge main into feat/libc-feraiseexcept 2026-10-25 12:55:37 +13:00
Dean Galvin c071f3d240 Merge main (check commit for the public_headers fix) 2026-10-25 12:43:32 +13:00
73266aaa1d fix(libkernel): reach the guest terminate handler from an ITIMER_REAL expiry on macOS
An ITIMER_REAL expiry with a guest SIGALRM handler throws, since guest
handlers are never run from the timer thread. On Linux and Windows that
throw goes through libc's exception runtime, so an uncaught one runs the
guest's std::set_terminate handler. On macOS the host keeps libc++abi,
so the throw ended in libc++abi's terminate and the guest handler never
ran. Throw through the guest runtime there, and record the general
macOS gap in the libc debt file.

Ported from #8658.

Co-authored-by: Himansh Raj <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 20:43:11 -03: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
orezraeyandClaude Opus 5.5 6b1962e978 Merge main into fix/libc-strftime-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 20:28:55 -03:00
Dean Galvin 83b63bfbb5 Merge main into windows/libc-exp2f-msun 2026-10-25 12:09:10 +13: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
JJenkxandClaude Opus 5.5 377e8fccec docs(debt): %a no longer goes to glibc on Linux
The libc debt entry for %a and %A still described the Windows-only
formatter and said Linux hands %a to glibc; since Linux routes %a and %A
to the same formatter, describe it for both platforms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 16:15:06 -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 Galvin e31ae9fc3e Merge main into windows/libc-powf-msun 2026-10-25 07:39:41 +13:00
Dean 0ea0f25e1b Merge pull request #8863 from UnhealthyKraken/feat/libc-feholdexcept
feat(libc): implement feholdexcept
2026-10-25 07:37:11 +13: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
Maz 2f94984276 feat(libc): export the collate facet vtable as data
Titles that resolve collate<char>'s vtable as an object need a 72-byte export matching console libc.prx (PPSA16833).
2026-10-24 21:49:15 +04:00
Yunus Shaikh 9e7b2ade4c Merge main into fix/libkernel-signal-handler-mask 2026-10-24 10:47:50 -07: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
Dean c3a9014a64 Merge pull request #8384 from hypermoist/feat/libc-dinkumware-conversions
feat(libc): implement the Dinkumware _Sto*x conversions
2026-10-25 06:35:36 +13:00
hypermistandClaude Opus 5.5 1ba909f580 fix(libc): keep errno for subnormal _Sto*x results
A nonzero subnormal result from _Stodx, _Stofx or _Stoldx sets neither
errno nor the error argument; only underflow to zero and overflow do.
_Stofx used to keep the ERANGE that strtof sets for an inexact
subnormal. Measured by running firmware 13.60's libSceLibcInternal.sprx
in a Linux host process, not on a console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 05:57:13 +13:00
Yunus Shaikh b72ea79cf9 Merge main into fix/libkernel-signal-handler-mask 2026-10-24 09:56:48 -07:00
Dean 0d8d3cce9f Merge pull request #8730 from p3n1cillin/codex/libc-srandomdev-20261020
feat(libc): implement srandomdev using host entropy
2026-10-25 05:52:29 +13:00
MarcZX10 2e71377d91 docs(libc): record wcstod subnormal errno gap 2026-10-24 16:49:00 +00:00
MarcZX10 89a15f16d4 fix(libc): set ERANGE for decimal strtod subnormals 2026-10-24 16:41:33 +00: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 c89baddeab docs(libc): repair the facet debt splice and record the locale fallback and wclog
The entry spliced the facet-lifetime sentence into the zeroed-storage claim; restore both, note that the new _Getcat entries ignore the locale name and always build the C facet, and mention std::wclog alongside std::clog.
2026-10-24 22:00:42 +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
Dean 23d89bf767 Merge pull request #10236 from orezraey/fix/libc-heap-error-report-measured-ps5
fix(libc): print sceLibcInternalHeapErrorReportForGame's report as a PS5 does
2026-10-25 04:16:56 +13:00
Dean Galvin 75e78c3cad Merge main into windows/libc-powf-msun 2026-10-25 04:13:50 +13:00
Dean Galvin cba2f88fc0 Merge main into feat/libc-feholdexcept 2026-10-25 04:13:50 +13:00
Dean 25b744db4a Merge pull request #9232 from UnhealthyKraken/feat/libc-feupdateenv
feat(libc): implement feupdateenv
2026-10-25 03:52:37 +13:00
Dean Galvin cac82f55d1 Merge main into codex/libc-srandomdev-20261020 2026-10-25 03:29:34 +13:00
hypermist 7cd3845f15 Merge remote-tracking branch 'upstream/main' into feat/libc-dinkumware-conversions-m2 2026-10-25 03:28:51 +13:00
akkadbakkad89andDevin 25992206bd docs(libc): trim the facet _Getcat debt entry
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-24 19:15:01 +05:30
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 f595326943 Merge pull request #8979 from ionut27001/fix/libc-random-seeding
fix(libc): seed random() and its default state as measured on a PS5
2026-10-25 01:51:00 +13:00
Dean 99feaf0eb8 Merge pull request #9845 from mazen320/feat/libc-num-put-iw-vtable
feat(libc): export the wide num_put facet vtable as data
2026-10-25 01:50:32 +13:00
orezraeyandClaude Opus 5.5 a046aaa50e docs(libc): state the measured heap report values, pid and block precisely
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 09:38:38 -03:00
thuanquangandClaude 5489f07047 docs(libc): correct the RSIZE_MAX that swprintf_s and vswprintf_s assume
Co-Authored-By: Claude <[email protected]>
2026-10-24 19:11:55 +07:00
Adrià bfb0806192 Merge pull request #8435 from hypermoist/feat/libc-libatomic-sized
feat(libc): add the sized __atomic library calls
2026-10-24 13:46:18 +02:00
Dean 9018bc438a Merge pull request #10003 from MarcZX10/codex/libc-acoshf-msun
fix(libc): follow msun for acoshf
2026-10-25 00:24:44 +13:00
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
Dean 6a3901fb69 Merge pull request #10384 from JJenkx/windows/libc-strcasecmp-sign
fix(libc): return only the sign from strcasecmp and strncasecmp as titles' libc.prx does
2026-10-24 22:12:38 +13:00
Dean e9a551d6f4 Merge pull request #9857 from JJenkx/windows/libc-trigf-msun
fix(libc): compute sinf, cosf, tanf and sincosf with FreeBSD msun's algorithms, as titles' libc.prx does
2026-10-24 22:12:11 +13:00
Dean Galvin 4a6e013eed Merge main into feat/libc-feupdateenv 2026-10-24 21:43:01 +13:00
Dean Galvin 7c52c8728a Merge main into feat/libc-feholdexcept 2026-10-24 21:43:00 +13:00
MarcZX10 a3e41499be fix(libc): match title printf conversions on Windows 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 91007ff06c Merge pull request #10312 from ntamas94/fix/ps4-libc-strerror
fix(libc): answer strerror as the titles' libc.prx does
2026-10-24 21:09:00 +13:00
Dean 69b5e014e9 Merge pull request #9342 from UnhealthyKraken/feat/libc-gets
feat(libc): implement gets line input
2026-10-24 20:48:06 +13:00