Commit Graph
466 Commits
Author SHA1 Message Date
JJenkx ad111b3ce1 fix(libc): preserve acoshf domain errno and exception flags 2026-10-25 22:07:34 -04:00
Dean 732ab06f41 Merge pull request #10354 from JJenkx/windows/libc-nextafter-msun
fix(libc): compute nextafter and nextafterf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-26 14:30:57 +13:00
Adrià 97d33464c5 Merge pull request #9527 from AlxcBTW/pr/libc-annex-k-stream-io
feat(libc): add the Annex K stream printf, scanf and freopen_s functions
2026-10-26 01:21:26 +01:00
Adrià 898a7fef4f Merge pull request #9631 from UnhealthyKraken/feat/libc-fetch-seqcst
feat(libc): implement sequential bitwise fetch helpers
2026-10-26 01:11:55 +01:00
Adrià 710cf9c035 Merge pull request #9668 from rooklz/fix/libc-acosf-msun
fix(libc): compute acosf with FreeBSD msun's algorithm, as the console's libc.prx does
2026-10-26 00:14:55 +01:00
Dean b90d009d9f Merge pull request #10665 from JJenkx/fix/libc-acoshf-positive-rounding-20261024
fix(libc): match acoshf positive-range evaluation
2026-10-26 11:14:24 +13:00
Dean 6cc5ec671d Merge pull request #10394 from JJenkx/windows/libc-drand48-upper-bits
fix(libc): return the upper 32 bits of the state from drand48 and erand48 as titles' libc.prx does
2026-10-26 11:05:43 +13:00
Dean 88f99678bf Merge pull request #10648 from edubox/feat/libc-pad-launch-attr
feat(libc): forward pthread attributes in _Pad::_Launch
2026-10-26 10:42:58 +13:00
Adrià 26ba9b6b71 Merge pull request #9499 from EagleBearerYS/fix/libkernel-signal-handler-mask
fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND
2026-10-25 22:05:12 +01:00
Dean 74a55da254 Merge pull request #10688 from edubox/feat/libc-mtx-timedlock
feat(libc): implement _Mtx_timedlock
2026-10-26 09:21:46 +13:00
Adrià 91a5573911 Merge pull request #9479 from EagleBearerYS/fix/libc-scanf-integer-widths-windows
fix(libc): convert scanf integers as FreeBSD does on Windows
2026-10-25 20:52:26 +01:00
Kraken d1a277b7d8 feat(libc): implement sequential bitwise fetch helpers 2026-10-25 19:16:20 +01:00
AlxcBTW 3aa53715ce docs(debt): record the unmeasured Annex K stream function results 2026-10-25 19:04:17 +01:00
Adrià 19fe176ddc Merge pull request #9456 from mazen320/feat/libc-time-get-vtable
feat(libc): export the time_get facet vtable as data
2026-10-25 18:38:52 +01:00
Adrià ac65cf490e Merge pull request #9613 from JJenkx/windows/libc-debt-bundled-readings
docs(debt): cite the bundled libc.prx for _Mtx_trylock, strdup and strndup
2026-10-25 18:36:43 +01:00
Eduardo Ruiz 1adc418e6e feat(libc): forward pthread attributes in _Pad::_Launch 2026-10-25 18:34:18 +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
Maz 4e657b158e feat(libc): export the time_get facet vtable as data
Console libSceLibcInternal exports o4kt51-uO48 as a 104-byte STT_OBJECT;
titles that resolve the symbol as data need a zeroed 13-slot vtable like the
other facet vtables, not a missing import.
2026-10-25 15:20:04 +01:00
Yunus Shaikh 8be8dc83af Merge main into fix/libkernel-signal-handler-mask
Main's #10706 moves the declarations of exported functions and their types
into the libraries' public headers, and gives WaitForPendingInSet a
KernelTimespec timeout. The merge keeps this branch's DeliverUnblockedPending
and ChangeBlockedMask with main's KernelTimespec. It takes main's side of
the declarations in GuestSignalSets.cpp, whose setjmp and longjmp this
branch had added and libc's Api.hpp now declares. GuestSignalHandlerMask.cpp
includes the libkernel and libc public headers in place of its own
declarations and GuestSignalSet and GuestSigaction types, as the
public_headers audit requires.
2026-10-25 07:05:46 -07: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 0514307ab8 fix(libkernel): translate waitpid child statuses to the guest numbering 2026-10-25 13:57:18 +01:00
fogydes 723d932f73 feat(libSceLibcInternal): implement posix_spawn process creation and reaping 2026-10-25 13:57:17 +01:00
Adrià ab0d7a52a0 Merge pull request #9395 from Gruzzberry/docs/windows-guest-file-names
docs(debt): record the guest file names Windows does not create like FreeBSD
2026-10-25 13:35:15 +01:00
JJenkx c05345f529 fix(libc): preserve acoshf log and reciprocal evaluation 2026-10-25 07:52:32 -04: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
Eduardo Ruiz 11bc03f8f4 fix(libc): keep the native Windows condition-variable path
std::condition_variable_any regressed guest_libc_cnd_timed_wait on the Windows runner. Keep CRITICAL_SECTION/CONDITION_VARIABLE on Windows and poll TryEnterCriticalSection for _Mtx_timedlock.
2026-10-25 11:51:10 +01:00
Adrià 0a3fcd6fc0 Merge pull request #9364 from thuanquang/docs/debt-sweep-libc-misc
docs(libc): correct stale rmdir, nanf and bad_optional_access debt statements
2026-10-25 11:45:51 +01:00
Adrià d9c32b7863 Merge pull request #9360 from thuanquang/docs/debt-sweep-libc-printf-constraint
docs(libc): correct the RSIZE_MAX that swprintf_s and vswprintf_s assume
2026-10-25 11:42:33 +01:00
Dean Galvin 80fea7b598 Merge branch 'main' into pr10354 2026-10-25 23:26:47 +13:00
Dean 63a863d3b0 Merge pull request #10314 from JJenkx/windows/libc-log1p-msun
fix(libc): compute log1p with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-25 23:09:45 +13: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
JJenkxandClaude Opus 5.5 185098a39d fix(libc): compute log1p with FreeBSD msun's algorithm, as titles' libc.prx does
log1p returned the host's log1p, whose last bit differs from the titles'
copy on Windows on 24,477,433 of 320 million random arguments. The titles'
copy is FreeBSD msun's s_log1p.c, and it sets EDOM at msun's NaN return,
for arguments below -1, -inf and negative NaNs, but not for log1p(-1).
log1p now computes that algorithm and sets EDOM there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 02:56:59 -04:00
JJenkxandClaude Opus 5.5 38e535f939 docs(debt): cite the bundled libc.prx for _Mtx_trylock, strdup and strndup
Both libc debt entries said the console behaviour was unverified. The
libc.prx that PPSA13934 ships in sce_module/ settles them (read from
disassembly, not measured on a console):

- _Mtx_trylock (0x5cf0) passes its argument to scePthreadMutexTrylock
  and returns 0 on success, 3 for SCE_KERNEL_ERROR_EBUSY and 4 for any
  other error.
- strdup (0x6b440) calls strlen and strndup (0x6b650) calls strnlen on
  the source with no null check, so both fault on a null source, except
  strndup(NULL, 0), which returns an empty copy where this libc returns
  null with EINVAL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 23:41:14 -04:00
Dean e7e3e9c198 Merge pull request #9844 from JJenkx/windows/libc-exp2f-msun
fix(libc): compute exp2f with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-25 16:36:34 +13:00
Eduardo Ruiz b3c9d35ae2 feat(libc): implement _Mtx_timedlock 2026-10-25 02:21:31 +01: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
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 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