Commit Graph
632 Commits
Author SHA1 Message Date
Dean da6b0ea8dd Merge pull request #11884 from JJenkx/windows/libc-strtof-nan-payload
fix(libc): keep NaN payloads in strtof and wcstof as titles' libc.prx does
2026-10-28 20:11:27 +13:00
Dean 5ab8acf45f Merge pull request #11309 from Danigamer05/feat/libc-signed-min32
feat(libc): implement signed 32-bit minimum value helper
2026-10-28 17:50:21 +13:00
Dean c9cc3b34db Merge pull request #11304 from Danigamer05/feat/libc-unsigned-max32
feat(libc): implement unsigned 32-bit maximum
2026-10-28 17:50:05 +13:00
Dean 24795c0f56 Merge pull request #10529 from JJenkx/fix/libc-expm1-scaling-association
fix(libc): preserve expm1 rounding during exponent scaling
2026-10-28 17:49:49 +13:00
Dean dbbe99aeb0 Merge pull request #9772 from UnhealthyKraken/feat/libc-floating-prefix
feat(libc): implement floating-point prefix helpers
2026-10-28 17:49:14 +13:00
Adrià 0c5401dcbd Merge pull request #9735 from mazen320/feat/libc-ctype-vtable
feat(libc): export the ctype facet vtable as data
2026-10-28 05:36:29 +01:00
Adrià 439d03db38 Merge pull request #11663 from Danigamer05/feat/libc-stdc-count-ones
feat(libc): add C23 count-ones exports
2026-10-28 04:19:47 +01:00
Adrià f1f1737371 Merge pull request #11647 from B-Howell/codex/libc-strtoq
feat(libc): implement strtoq
2026-10-28 04:06:20 +01:00
Dean 4c6fcfcb5c Merge pull request #9763 from rooklz/fix/libc-freopen-closed-stream
fix(libc): reopen a closed stream in freopen instead of aborting
2026-10-28 13:48:50 +13:00
Dean 057de19313 Merge pull request #11556 from xXPBSXx/libm/sinh-msun
fix(libc): compute sinh with FreeBSD msun's algorithm
2026-10-28 13:03:47 +13:00
Dean 9f605c98d2 Merge pull request #10283 from JJenkx/windows/libc-cbrt-msun
fix(libc): compute cbrt with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-28 13:01:01 +13:00
Dean 46b9aa3768 Merge pull request #9648 from JJenkx/windows/libc-rand-console
fix(libc): follow the console's rand, srand and rand_r
2026-10-28 13:00:35 +13:00
Dean 6e9b9134f6 Merge pull request #11846 from heditrigui/feat/libc-reallocarray
feat(libc): implement reallocarray
2026-10-28 12:10:58 +13:00
Adrià e274546099 Merge pull request #11302 from Danigamer05/feat/libc-signed-max64
feat(libc): implement signed 64-bit maximum
2026-10-27 22:26:29 +01:00
Adrià 6d99bf4ccb Merge pull request #11300 from Danigamer05/feat/libc-signed-min64
feat(libc): implement signed 64-bit minimum
2026-10-27 22:16:40 +01:00
Adrià 4a6005955f Merge pull request #10898 from imellag/feat/libkernel-memory-protection-macos
feat(libkernel): guest memory protection and VirtualQuery on macOS hosts
2026-10-27 21:42:24 +01:00
Adrià 80b209d984 Merge pull request #11295 from Danigamer05/feat/libc-unsigned-min32
feat(libc): implement unsigned 32-bit minimum
2026-10-27 21:20:30 +01:00
Dean ab6a87a163 Merge pull request #10460 from Danigamer05/feat/libc-unsigned-max64
feat(libc): implement unsigned 64-bit maximum
2026-10-28 06:53:22 +13:00
JJenkxandClaude Opus 5.5 bece5871e2 fix(libc): keep NaN payloads in strtof and wcstof as titles' libc.prx does
strtof and wcstof returned the default quiet NaN for any NAN(...)
sequence. The libc.prx bundled with eleven titles reads the payload as
its strtod does, but into one 32-bit word: a blank after the first group
of digits ends it, the first 8 digits are kept and cut to 24 bits, the
result goes under the quiet bit with the sign, and a zero payload
becomes 1. HexNanPayload now takes the word count, two for double and
one for float, and the NaN table test checks the measured float bits
and end for all 64 inputs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 07:13:19 -04:00
Maz d4a25e115a feat(libc): export the ctype facet vtable as data
Titles that import ctype<char>'s vtable as a 112-byte object need the fourteen-slot STT_OBJECT measured on PPSA16833 libc.prx.
2026-10-27 15:06:56 +04:00
Adrià 6a5950b5ce Merge pull request #10903 from imellag/test/libc-update-env-macos
test(libc): run the feupdateenv checks on macOS and under Rosetta 2
2026-10-27 12:00:19 +01:00
JJenkx f89e32170c fix(libc): preserve expm1 scaling association under directed rounding 2026-10-27 06:20:52 -04:00
Hedi Trigui 3d17309724 feat(libc): implement reallocarray 2026-10-27 10:46:33 +01:00
JJenkxandClaude Opus 5.5 8f39bcc549 Merge main into PR #10283
Conflicts with main's newer libc changes resolved without changing either
side: the debt list keeps each side's entry changes (per entry, deletions
included), GuestMath.cpp keeps both sides' test functions and calls, and
Math.cpp differs from main by exactly this branch's own changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 05:06:27 -04:00
Dean 77f68f314b Merge pull request #11560 from Ragbie/fix/write-after-read-update-stream
fix(libc): set up streams for writing after a read as FreeBSD does on Windows
2026-10-27 21:27:48 +13:00
Dean f9b2db1d41 Merge pull request #11269 from Gruzzberry/fix/realpath-symlinks
fix(libc): realpath resolves symbolic links like FreeBSD
2026-10-27 21:22:09 +13:00
Dean d5f7d86ccc Merge pull request #11139 from JJenkx/fix/libc-modf-floating-environment
fix(libc): preserve modf decomposition and floating-point status
2026-10-27 21:20:33 +13:00
Dean d090e62841 Merge pull request #11074 from JJenkx/fix/libc-frexpf-floating-environment
fix(libc): preserve frexpf decomposition and exception behavior
2026-10-27 21:18:34 +13:00
Rookie 4c28647f0a fix(libc): answer EBADF to a null filename on a closed stream as the console does 2026-10-27 08:11:28 +00:00
Rookie 9618254977 fix(libc): reopen a closed stream in freopen instead of aborting 2026-10-27 08:11:28 +00:00
Dean 2aacb376ee Merge pull request #10346 from JJenkx/windows/libc-logb-msun
fix(libc): compute logb and logbf with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-27 21:09:12 +13:00
Dean 5a36b2df1e Merge pull request #9850 from JJenkx/windows/libc-powf-msun
fix(libc): compute powf like the libc.prx that titles ship
2026-10-27 21:07:00 +13:00
Dean 853b370f01 Merge pull request #9784 from JJenkx/windows/libc-atan2f-msun
fix(libc): compute atan2f with FreeBSD msun's algorithm, as titles' libc.prx does
2026-10-27 21:06:05 +13:00
Dean 619ac3c2b6 Merge pull request #10467 from MarcZX10/fix/libc-tgammaf-underflow-sign
fix(libc): preserve tgammaf underflow sign
2026-10-27 20:53:02 +13:00
Dean 2f0a0071f5 Merge pull request #10251 from orezraey/docs/libc-fopen-directory-measured-ps5
docs(libc): record fopen and freopen of directories as measured on a PS5
2026-10-27 20:52:15 +13:00
Adrià 8df2c3ed0e Merge pull request #11259 from orezraey/docs/libc-reallocalign-measured-ps5
docs(libc): record reallocalign to size 0 as measured on a PS5
2026-10-27 08:29:28 +01:00
Adrià 8787ae1bb3 Merge pull request #11245 from AlexFigas/docs/libc-isfinitel-bundled-code
docs(debt): close the __isfinitel entry with the bundled libc.prx code
2026-10-27 08:23:28 +01:00
Emanuele f7f88a4886 fix(libkernel): wire a remapped locked range again on macOS
- mlock on macOS skipped every page the locked ranges recorded, but a
  mapping that replaces a locked range in place leaves the record behind
  without wires, so a later mlock returned 0 and wired nothing. Within a
  recorded range it now wires again the host regions whose wire count is
  0. The mlock test locks, remaps the range fixed and locks again.
- munlock and munlockall on macOS hold the locked-range lock across the
  host unwire and the record update, so a concurrent mlock cannot see a
  range as wired while it is being unwired.
- sceKernelVirtualQuery limits the host region it reports to the write
  watch run that holds the address, so the permissions it reports hold
  for the whole extent.
- The libc debt entry says what the mapping paths do: they register the
  range again, and GuestWriteWatchProtectionChanged has no caller yet.
2026-10-27 08:16:36 +01:00
Emanuele f2e8d5a3eb fix(libkernel): address the macOS memory protection review
- mlock on macOS wires only the pages libkernel has not wired yet. XNU
  counts each wire of a page, and the locked ranges merge overlapping
  locks, so a page locked twice stayed wired after munlock and
  munlockall. The mlock test checks the wire count on macOS.
- mprotect changes a watched page through GuestWriteWatchProtect, which
  applies the host protection and records it under the write watch's
  lock, so a collection on another thread cannot run between the two.
  The write watch test covers it.
- sceKernelVirtualQuery takes a watched page's write permission from the
  write watch for memory outside the guest allocation registry.
- GuestAllocationsGuestPages counts an image segment up to the end of
  its last host page, as the image page collection does.
- The macOS includes stay in main's include block, so the host code
  other pull requests add there still sees them; the unused Mach-O
  headers and the end trim, which never changed the protected spans,
  are gone, and the guest page size is passed in.
- The libc and libkernel debt entries describe what is wired now.
2026-10-27 08:16:36 +01:00
xXPBSXx 9dc6ed12c2 Merge main (81267b2204) into libm/sinh-msun 2026-10-27 08:09:31 +01:00
xXPBSXxandClaude Sonnet 5.5 a695743b3d fix(libc): set ERANGE when sinh overflows
The host sinh set errno to ERANGE on overflow and sinhf does, but the msun port
returned the overflowed value with errno untouched. The overflow path of
sinh_nid_postfix sets ERANGE again; msun itself sets no errno.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-27 07:59:34 +01:00
Adrià b806f1a7a0 Merge pull request #11217 from AlexFigas/docs/libc-dinkumware-division-evidence
docs(debt): cut the long-double Dinkumware entry to _LLog with the bundled libc.prx code
2026-10-27 07:58:44 +01:00
xXPBSXx fccdc6d687 Merge main (951e5963a4) into libm/sinh-msun 2026-10-27 07:58:16 +01:00
Dean 1a13c2969f Merge pull request #9833 from MarcZX10/codex/libc-strtod-decimal-subnormal-erange
fix(libc): set ERANGE for decimal strtod subnormals
2026-10-27 18:21:37 +13:00
Dean 940c298d51 Merge pull request #9698 from mazen320/feat/libc-num-put-vtable-size
fix(libc): size the num_put facet vtable to 112 bytes
2026-10-27 18:20:54 +13:00
Dean 8aa1f9ef7f Merge pull request #9344 from MarcZX10/codex/macos-backtrace-support
feat(libc): restore macOS guest backtraces
2026-10-27 18:20:03 +13:00
Adrià 60bb466419 Merge pull request #10505 from maximilianfv/fix/libkernel-macos-itimer-terminate
fix(libkernel): reach the guest terminate handler from an ITIMER_REAL expiry on macOS
2026-10-27 04:51:54 +01:00
Adrià 71a20013cd Merge pull request #11164 from orezraey/docs/libc-hardware-concurrency-measured-ps5
docs(libc): record std::thread::hardware_concurrency as measured on a PS5
2026-10-27 04:51:40 +01:00
Adrià 1d667d5f52 Merge pull request #11121 from orezraey/docs/libc-fenv-setlocale-strcasecmp-measured-ps5
docs(libc): record feholdexcept, fegetexcept, setlocale and strcasecmp as measured on a PS5
2026-10-27 04:51:24 +01:00
UnhealthyKraken 92effeb9d3 chore(libc): merge main and preserve prefix debt 2026-10-27 02:42:31 +00:00