Commit Graph
534 Commits
Author SHA1 Message Date
Dean Galvin 676ee4fe42 Merge branch 'main' into pr8903 2026-10-26 09:35:29 +13:00
orezraeyandClaude Opus 5.5 2fd60d3ebd feat(libc): export __fe_dfl_env as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:30:06 -03: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
Disaster c66f61ff52 feat(libc): wire the collate<char> facet vtable
The nine-slot _ZTVSt7collateIcE export added by #9979 was still zeroed, so a guest that called through the exported vtable faulted. Fill slots 2 through 8 with the same facet methods that g_collateVtable uses, leave the offset-to-top and typeinfo slots zero, and cover compare, transform, hash, retain and release through the exported object.
2026-10-25 23:21:45 +03:00
Maz a48a417101 fix(libc): keep char and wide time_get vtables after rebase 2026-10-26 00:02:16 +04:00
Maz bd6406392f feat(libc): export the wide time_get facet vtable as data 2026-10-26 00:02:15 +04:00
orezraeyandClaude Opus 5.5 3dac7eb76c fix(libc): check the fdopen mode before the descriptor and skip the access check as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:01:01 -03: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
Disaster 35c38ce8d5 fix(libc): match measured _Exp and _FExp special values 2026-10-25 22:38:39 +03: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
Radu Ursache 66ca5c0442 feat(relinker): trace function imports on macOS
Walk each macOS function import before the guest entry and pass it through TraceImport_nid_no_patch, as Linux and Windows already do. An x86-64 libc build records the call and prints it on SIGABRT.
2026-10-25 18:37:23 +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 Galvin e890f802ed Merge branch 'main' into pr10786 2026-10-26 05:32:41 +13:00
verusferro 1d31901c4b feat(libc): format num_put<char>::do_put as the console's libc does
The num_put facet's eight do_put overloads build the console's printf format from the stream flags, format through snprintf and lay out the result as the SDK libc.prx does: thousands separators from the stream locale's numpunct, its decimal point, fill and width with left, right and internal adjustment, true and false names under boolalpha, and the console's prefix and infinity rules for floating point.
2026-10-25 19:19:16 +03:00
verusferro 3338ffefff feat(libc): format time_put<char>::do_put as the console's libc does
The time_put facet's do_put formats % with the modifier and conversion through strftime and writes the result through the output iterator's stream buffer, following the SDK libc.prx: it stores into the put area while room remains, calls overflow otherwise, and marks the iterator failed when overflow returns eof or the buffer is null.
2026-10-25 19:18:04 +03: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
verusferro c9df854687 fix(libc): compute strftime week numbers as the console's libc does
%G, %g and %V no longer throw for a negative tm_yday, a tm_yday past the year or a tm_wday below -6. They follow the year and week rule of the SDK libc.prx, read from its disassembly and checked by running it, with its leap-year test and 32-bit arithmetic. %U and %W also wrap in 32 bits as that module does.
2026-10-25 17:03:45 +03: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
Disaster e0547ee7c5 feat(libc): implement _LCosh and _LSinh
Add the long-double siblings of _Cosh and _Sinh with the same scaled finite-input path, signed-zero handling and Dinkumware two-argument contracts. The reductions use a long-double ln2 split, and the scaled-range tests pin 64-bit results instead of the intermediate writer's output. Cover known values, signs and non-finite inputs in guest_math; record the unverified console results and exception behavior in the libc debt list.
2026-10-25 04:16:26 +03:00
Dean Galvin 45046a0cbc Merge main into PR branch (public headers: declare each export once, drop local declarations) 2026-10-25 14:03:49 +13:00
Disaster 878124772c feat(libc): implement _Exp and _FExp 2026-10-25 04:02:47 +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
Dean Galvin 1616abc519 Merge main into feat/libc-feraiseexcept 2026-10-25 12:55:37 +13: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