Commit Graph
652 Commits
Author SHA1 Message Date
QRMOE 5836873170 fix(memory): honor low guest mapping hints 2026-10-23 16:51:33 +02:00
orezraeyandClaude Opus 5.5 d8d7c5aacd Merge main into fix/libc-fetestexcept-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 11:39:38 -03:00
Dean dcd40e119d Merge pull request #8287 from mugurc/fix/tests-fenv-masks-rosetta
fix(tests): compare the floating-point exception masks with the ones the host keeps
2026-10-24 03:28:00 +13:00
orezraeyandClaude Opus 5.5 4756ead5d7 fix(libc): cap argument positions and share the known conversion list
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 11:26:07 -03:00
orezraeyandClaude Opus 5.5 33f1d7ec43 fix(libc): format sizes, NaN signs, UTF-16 units, positions and unknown conversions as a PS5 does
Measured through libSceLibcInternal.sprx's snprintf in a payload process on a PS5 (firmware 13.60): any size is accepted, a NaN keeps its sign and the + and space flags, each UTF-16 unit of %ls and %lc is encoded alone, positions above 99 work, and an unknown conversion such as %m prints % and its letter.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 11:20:47 -03:00
GruzzberryandClaude Opus 5.5 d2639b06c7 docs(debt): shorten the guest file names entry to state the gap first
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 14:39:41 +01:00
GruzzberryandClaude Opus 5.5 f2d3512d33 docs(debt): say the guest file names are not escaped rather than unchanged
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 14:39:41 +01:00
GruzzberryandClaude Sonnet 5.5 52487b7fcc docs(debt): record the guest file names Windows does not create like FreeBSD
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 14:39:41 +01:00
orezraeyandClaude Opus 5.5 c1ce36f9ee Merge main into fix/libc-strftime-measured-ps5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 10:24:47 -03:00
Dean Galvin 192a490b19 Merge main into fix/tzname-no-dst 2026-10-24 02:10:50 +13:00
Dean 65f1d28e7d Merge pull request #9109 from Retr0G28/fix/alias-trailing-slash-windows
fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
2026-10-24 02:08:03 +13:00
Dean 8dcbc4e5c9 Merge pull request #9643 from Noxy-HNR/fix/libc-float-domain-errors
fix(libc): preserve errno across fmodf domain errors
2026-10-24 02:03:09 +13:00
Dean be686ec858 Merge pull request #9642 from Noxy-HNR/fix/guest-byte-case-locale
fix(libc): isolate byte case comparisons from the host locale
2026-10-24 02:02:44 +13:00
Maz 6224ab70b9 feat(libc): export the wide codecvt facet vtable as data
Console title libc.prx (PPSA26344) and libSceLibcInternal export H-TDszhsYuY as STT_OBJECT st_size 104; titles that resolve it as data need thirteen zeroed uintptr_t slots.
2026-10-23 16:26:44 +04:00
orezraey ed75f2fee1 Merge branch 'docs/libc-math-measured-ps5' into fix/libc-strftime-measured-ps5
# Conflicts:
#	docs/dev/debt/libc.md
2026-10-23 08:58:39 -03:00
orezraeyandClaude Opus 5.5 c22a810b6b revert(libc): move fetestexcept and the memmem note to their own pull requests
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:48:45 -03:00
orezraeyandClaude Opus 5.5 a51fcc5aa6 docs(libc): record that libSceLibcInternal does not export memmem or memccpy
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:41:39 -03:00
orezraeyandClaude Opus 5.5 815a9e0289 fix(libc): return fetestexcept's unmasked status bits as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 08:41:38 -03:00
hypermistandClaude Opus 5.5 547e0b74dd docs(libc): record the console evidence for the sized __atomic calls
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013XFS3FUfBtqCVfwmBrRQ6q
2026-10-24 00:28:24 +13:00
dotaku22 171419e958 feat(libc): implement buffered stream purge 2026-10-23 12:42:22 +02:00
orezraey ac35cf8c9c Merge remote-tracking branch 'origin/main' into fix/libc-gethostname-measured-ps5 2026-10-23 06:55:24 -03:00
orezraey afcba0fa55 Merge remote-tracking branch 'origin/main' into docs/libc-math-measured-ps5 2026-10-23 06:55:05 -03:00
orezraey 82b3fedc95 Merge remote-tracking branch 'origin/main' into fix/libc-strftime-measured-ps5
# Conflicts:
#	docs/dev/debt/libc.md
2026-10-23 06:54:02 -03:00
thuanquangandClaude e53f78214a docs(libc): note where the wcsncat_s overlap rule comes from
The debt entry says the rule follows a static reading of the console's
wcsncat_s in libc.prx, that wcscat_s inherits it unread, and that the
narrow strncat_s keeps a wider rule, as asked in review.

Co-Authored-By: Claude <[email protected]>
2026-10-23 15:19:25 +07:00
Retr0 0f3d4bc9ee fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
FreeBSD 11.4's lookup() (sys/kern/vfs_lookup.c) fails with ENOTDIR when
a path with a trailing slash ends at something that is not a directory.
On Windows a mount alias dropped the slash, and the host calls do not
report ENOTDIR for "file\", so unlink, rename and open acted on the file
or failed with EINVAL. Guest path resolution now rejects an existing
non-directory named with a trailing slash with ENOTDIR on every host, and
a mount alias keeps the slash on Windows as it does on Linux and macOS.
2026-10-23 08:21:01 +03:00
MarcZX10 6a13704d3d fix(libc): follow msun for acoshf 2026-10-23 03:45:26 +00:00
MarcZX10 0f35e7b176 fix(libc): follow msun for coshf 2026-10-23 03:35:47 +00:00
orezraeyandClaude Opus 5.5 5ea45388a2 fix(libc): throw for the ISO week of a negative tm_yday and record the measured gaps
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 22:34:52 -03:00
hypermistandClaude Opus 5.5 d2927e0ec1 fix(libc): follow libc.prx for strtof signs and hexadecimal round-up ERANGE
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 14:19:46 +13:00
hypermist bda7105405 Merge remote-tracking branch 'upstream/main' into fix/libc-strtof-sign-hex-range 2026-10-23 14:15:39 +13:00
orezraeyandClaude Opus 5.5 d56c3f91f2 fix(libc): report the empty host name measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:42:44 -03:00
JJenkxandClaude Opus 5.5 1f206b59c4 fix(libc): accept any setlocale category and only the C locale, as titles' libc.prx does
setlocale returned a null pointer for a category outside 0 to 6 and
accepted "POSIX" as a name for "C". The libc.prx that titles ship
ignores the category, so setlocale(-1, NULL) and setlocale(7, "C")
return "C", and returns a null pointer for "POSIX" as for any name other
than "C" or the empty string.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:36:58 -04:00
hypermist 3563fa21c4 Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte 2026-10-23 13:27:39 +13:00
orezraeyandClaude Opus 5.5 2151929559 docs(libc): record nearbyintf, getw, putw, __isfinitel and _FSinh measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 21:18:27 -03:00
orezraeyandClaude Opus 5.5 8bb01531d1 docs(libc): record that libSceLibcInternal does not export memmem or memccpy
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:41:18 -03:00
orezraeyandClaude Opus 5.5 a814ef3f9a fix(libc): return fetestexcept's unmasked status bits as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:40:57 -03:00
orezraeyandClaude Opus 5.5 62ce458120 fix(libc): format strftime and asctime fields as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:36:58 -03:00
Yunus Shaikh b463132a56 Merge main into fix/libkernel-signal-handler-mask
# Conflicts:
#	core/libs/prx/libkernel/System/src/Signals.cpp
#	docs/dev/debt/libkernel.md
2026-10-22 16:27:25 -07:00
valenciana-nc 1d0c48d1ee fix(libc): preserve exception flags for zero-argument float Bessel calls 2026-10-22 16:34:38 -06:00
Dean 9e568a389b Merge pull request #8376 from hypermoist/feat/libc-dinkumware-dispatchers
feat(libc): implement the Dinkumware _Stod, _Stoll, _Sin and _Log helpers
2026-10-23 09:51:54 +13:00
JJenkxandClaude Opus 5.5 ac92cc6281 fix(libc): compute cbrtf with FreeBSD msun's algorithm, as titles' libc.prx does
cbrtf returned the host cbrt, so its result depended on the host: on
Windows it differs from the libc.prx that titles ship on 1,303,357,444 of
the 2^32 floats. That libc.prx is msun's s_cbrtf.c, which gives the same
bits as PPSA07923's, PPSA05916's and PPSA13934's copies for every argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:22:49 -04:00
JJenkxandClaude Opus 5.5 e601dbd7a4 fix(libc): compute sinf, cosf, tanf and sincosf with FreeBSD msun's algorithms, as titles' libc.prx does
They returned the host sin, cos and tan, so their last bit and errno
depended on the host: on Windows sinf differs from the libc.prx that titles
ship on 3,349,410 of the 2^32 floats, cosf on 3,382,210 and tanf on
303,874,018. That libc.prx is msun's s_sinf.c, s_cosf.c and s_tanf.c over
the double-precision kernels and e_rem_pio2f.c with k_rem_pio2.c; its
sincosf returns the same pair, and only an infinite argument sets EDOM.
The ports give the same bits and errno as PPSA07923's, PPSA05916's and
PPSA13934's copies for every argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:22:31 -04:00
JJenkxandClaude Opus 5.5 a22e959cd8 fix(libc): compute logf with FreeBSD msun's algorithm, as titles' libc.prx does
logf returned the host log, so its last bit and errno depended on the host:
on Windows the bits differ from the libc.prx that titles ship on 13,225,175
of the 2^32 floats. That libc.prx is msun's e_logf.c, setting ERANGE for
+-0 and EDOM for every argument with the sign bit set. The port gives the
same bits and errno as PPSA07923's and PPSA05916's copies for every
argument; the FMA-contracted copy of PPSA13934 differs by 1 ulp on 961,881.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:21:35 -04:00
JJenkxandClaude Opus 5.5 5e03230c28 fix(libc): compute atanf with FreeBSD msun's algorithm, as titles' libc.prx does
atanf returned the host atan, so its last bit depended on the host: on
Windows it differs from the libc.prx that titles ship on 6,481,820 of the
2^32 floats. That libc.prx is msun's s_atanf.c, which gives the same bits
as PPSA07923's, PPSA05916's and PPSA13934's copies for every argument.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:20:38 -04:00
JJenkxandClaude Opus 5.5 ea6aa0a809 fix(libc): follow the console fgetws for short buffers and read errors
The fgetws in the libc.prx that titles ship (the same 133 bytes in the
copies of PPSA13934, PPSA07923 and PPSA05916, read from disassembly)
differs from this one in two cases:

- A size below 2 returns null at once, without writing the buffer,
  errno or the stream (cmp $0x2,%esi; jge, else the null result). Here a
  size of 1 stored a NUL and returned the buffer, and a size of 0 or less
  set the stream error and errno 22.
- When fgetwc returns -1 after characters were stored, the console
  null-terminates and returns the buffer; it returns null only when
  nothing was stored, and never checks ferror. Here a read error after
  some characters returned null.

The rest already matches: each fgetwc result is stored as its low 16 bits
(mov %ax,(%rbx)), and the newline test compares all 32 bits. A null buffer
or stream, which the console dereferences, keeps failing with errno 22.

guest_standard_streams now expects the console results for sizes 1, 0
and -1 and for an invalid byte after a stored character; its fgetwc error
indicator check is unchanged. The libc debt entry cites the reading and
what it leaves unverified.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:19:24 -04:00
Braxton Atkinson 07bec523ad docs(libc): separate byte-case compatibility note 2026-10-22 15:00:23 -05:00
Braxton Atkinson ee057ea155 fix(libc): preserve errno across fmodf domain errors 2026-10-22 14:59:20 -05:00
Kraken 5dfd50502a chore(libc): refresh feupdateenv and preserve debt entries 2026-10-22 20:27:31 +01:00
Braxton Atkinson 9b40e1e9b6 fix(libs): keep byte case comparisons in the guest C locale 2026-10-22 14:10:45 -05:00
Adrià 8580e7e214 Merge pull request #9331 from MarcZX10/codex/wide-scan-reported-edge-cases
fix(libc): match reported wide scanf edge cases
2026-10-22 20:36:35 +02:00