Commit Graph
1045 Commits
Author SHA1 Message Date
xxLnolan 30454880de fix(libc): implement PAF mspace memalign 2026-10-19 13:59:05 +02:00
Dean 6762694735 Merge pull request #7761 from angleboyndn-stack/fix/libc-secure-string-destination-limits
fix(libc): reject oversized secure string destinations
2026-10-20 00:52:00 +13:00
Dean f72c7aacfa Merge pull request #7506 from cadenasynyster/fix/libc-throw-bad-variant-access
feat(libc): implement std::__throw_bad_variant_access
2026-10-19 23:54:48 +13:00
Adrià 3050105f24 Merge pull request #6707 from karimibrahim07/feat/libc-qsort-s
feat(libc): implement qsort_s
2026-10-19 11:47:03 +02:00
Adrià 959cfdd1c5 Merge pull request #6686 from DavidSamir/fix/libc-mktime-before-1900-macos
fix(libc): convert mktime before 1900 from the zone's own offsets on macOS
2026-10-19 10:59:57 +02:00
Adrià 096279ed25 Merge pull request #6610 from JJenkx/fix/linux-sdk-heap-owner
fix(libc): share the guest SDK application allocator
2026-10-19 09:38:02 +02:00
Adrià 6b8228b2bf Merge pull request #6585 from Mouad-Scriptz-0/feat/libc-setw
feat(libc): export std::setw(int)
2026-10-19 09:02:04 +02:00
Adrià 64a9caa62d Merge pull request #6499 from parl0v/perf/keep-import-across-split
perf(agc): keep a host import across a split of its guest range
2026-10-19 08:54:36 +02:00
ShinMalphur 016f743c64 fix(libc): reject oversized secure string destinations 2026-10-19 13:11:00 +06:30
Adrià dc54701e49 Merge pull request #6541 from wachi35676/fix/libc-fopen-random-device
fix(libc): read /dev/random and /dev/urandom through fopen
2026-10-19 08:38:06 +02:00
Adrià 22410061d5 Merge pull request #6542 from wachi35676/fix/libkernel-windows-shared-file-mmap
feat(libkernel): map regular files with mmap on Windows
2026-10-19 08:37:27 +02:00
Adrià 9817d53cc9 Merge pull request #6345 from hypermoist/feat/libc-exact-math
feat(libc): add exact long double and BSD math exports
2026-10-19 08:06:40 +02:00
Josip Parlov f9caa09745 perf(agc): keep a host import across a split of its guest range 2026-10-19 08:02:12 +02:00
Adrià 46f27623c2 Merge pull request #6278 from hypermoist/perf/unwind-dl-find-object
perf(libc): find unwind tables with _dl_find_object on glibc
2026-10-19 07:53:50 +02:00
hypermistandClaude Opus 5.5 1181068a68 fix(libc): keep exact math results independent of the host libm
drem, dremf, remainderl and remquol now set EDOM themselves for an
infinite x or a zero y, as fmodl does. Apple's libm never sets errno and
MinGW skips it for long double, so the host could not be relied on.

Guest long is 64 bits, but the host long is 32 bits on Windows. The
lrint, lround and scalbln exports now take and return std::int64_t,
round through llrint and llround, and clamp scalbln exponents to the int
range, where the result is already infinite or zero. The test uses
INT64_MAX instead of LONG_MAX and covers remainderl, dremf and a 2^40
lrint result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:45:08 +13:00
hypermistandClaude Opus 5.5 298fbdc917 fix(libc): walk program headers outside the unwind cache lock
dl_iterate_phdr takes the loader lock. Calling it with the base cache
mutex held inverts the order against a thread inside dlopen whose
constructor throws and reaches FindFrameFast. Probe first, then lock
only for the lookup and the insert; racing misses compute the same
bases and emplace keeps the first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:33:35 +13:00
Dean bc9b1e6d74 Merge pull request #6917 from milescoviello/perf/guest-lease-snapshot
perf(libc): keep the guest allocation lease snapshot until the registry changes
2026-10-19 18:21:58 +13:00
Adrià 676d423968 Merge pull request #6532 from ArjenS-LA/feat/guest-bcopy
feat(libc): implement overlap-safe bcopy
2026-10-19 06:09:37 +02:00
Adrià 1377213ab7 Merge pull request #5957 from xXPBSXx/cand/guest-abort-report-r6
fix(libc): name a guest abort() in the crash report
2026-10-19 04:24:37 +02:00
Adrià b4d517ed10 Merge pull request #6334 from hypermoist/feat/libc-dinkumware-atomics
feat(libc): implement the remaining Dinkumware _Atomic helpers
2026-10-19 04:03:52 +02:00
Adrià 79d7d26b6d Merge pull request #6484 from Ondra97/codex/team-20261015-worker-2
fix(libkernel): share guest rename semantics with sceKernelRename
2026-10-19 03:35:57 +02:00
Adrià d5c854dd9b Merge pull request #6339 from hypermoist/feat/libc-std-vector-algorithms
feat(libc): implement the __std vectorized algorithm helpers
2026-10-19 02:40:50 +02:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 ddb774ad26 feat(libkernel): map regular files with mmap on Windows
A shared mapping is a view of a file section created on the descriptor's
handle, read-write when the descriptor is, otherwise read-only. A private
mapping is a copy of the file read at mmap, as POSIX allows. Anonymous
shm_open objects and JIT shared memory descriptors are temporary files on
Windows, so mmap now maps them too (it failed with EOPNOTSUPP before).
mprotect of a mapped view above the view's protection fails with EACCES
before any bookkeeping changes. The cases Windows cannot represent are
listed in the libkernel debt.

Dusklight (PPSA99305) uses SQLite in WAL mode, which maps its -shm file.
On Windows main f0634088b every start logged "Failed to start
transaction: disk I/O error" for its Dawn and pipeline caches (3 of 3
runs); with this change the caches initialise and their WAL files fill
(4 of 4 runs). The title reaches its menu either way.

A shared mapping may end inside the 16 KiB page that holds the end of
the file, as POSIX mmap allows: the view ends with the file's last 4 KiB
host page, which Windows zero-fills past the end, the rest of the guest
page is private zero pages, and the file never grows. A mapping that
reaches a whole page past the end still fails with EOPNOTSUPP.

PS5LM Plus (PPSA99581) loads its model with llama.cpp, which maps the
whole GGUF file shared and read-only. With a 491,400,032-byte model,
Windows main 5de7a46e0 and this change without the last page logged
"llama_model_load: error loading model: mmap failed: Operation not
supported" (3 of 3 runs); now the model loads and the completion of
"The capital of France is" starts with " Paris" (3 of 3 runs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 05:02:25 +05:00
Adrià 3b20a366ca Merge pull request #6167 from freshstart2066-create/feat/libc-ceill-floorl
feat(libc): implement ceill and floorl
2026-10-19 02:00:27 +02:00
Adrià 0f121739ce Merge pull request #6331 from hypermoist/feat/libc-generic-atomics
feat(libc): implement the 16-byte __sync builtins and __atomic_is_lock_free
2026-10-19 01:37:09 +02:00
Adrià 50bb0b95cf Merge pull request #6330 from hypermoist/feat/libc-float-builtins
feat(libc): implement the compiler-rt floating-point builtins
2026-10-19 01:24:52 +02:00
Adrià a4a1021208 Merge pull request #6234 from Ondra97/codex/fix-file-write-gpu-coherence
fix(libs): flush pending GPU results before file writes
2026-10-19 01:24:42 +02:00
Adrià 8e7904b201 Merge pull request #6322 from hypermoist/feat/libc-integer-builtins
feat(libc): implement the compiler-rt integer builtins
2026-10-19 01:15:26 +02:00
BIGFERRY999 b28a84d421 feat(libc): implement ceill and floorl 2026-10-19 01:14:40 +02:00
hypermistandClaude Opus 5.5 ec3fe412db feat(libc): implement the remaining Dinkumware _Atomic helpers
The 1-, 2- and 8-byte loads, stores, exchanges, compare-exchanges and fetch
operations, _Atomic_is_lock_free_N, the flag and fence functions and the
lock-based generic _Atomic_copy, _Atomic_exchange and _Atomic_compare_exchange_*,
matching the libc.prx bundled with PPSA08427 including its handling of
invalid memory orders.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q8tinbP1MUpUaDsbNWnGnu
2026-10-19 01:09:51 +02:00
Ondra97 a64d038154 fix(libs): flush pending GPU results before file writes 2026-10-19 00:53:25 +02:00
BIGFERRY999 6e3ae1c02e feat(libc): implement fmaf 2026-10-19 00:46:38 +02:00
Adrià c820102bd0 Merge pull request #6162 from freshstart2066-create/feat/libc-remquo
feat(libc): implement remquo and remquof
2026-10-19 00:28:20 +02:00
Adrià 8b8edc5619 Merge pull request #6315 from hypermoist/fix/libc-snprintf-s-constraints
fix(libc): check the C11 runtime constraints in snprintf_s and vsnprintf_s
2026-10-19 00:17:04 +02:00
Adrià 38a848a1b7 Merge pull request #6287 from ahmad3a4/fix/libc-append-streams-windows
fix(libc): append stream writes atomically on Windows
2026-10-19 00:16:59 +02:00
BIGFERRY999 994fd66bf4 feat(libc): implement remquo and remquof 2026-10-19 00:10:02 +02:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 b4e80e8fc7 fix(libc): read /dev/random and /dev/urandom through fopen
fopen resolved the random device paths to a host file that does not
exist and failed with ENOENT, while open and sceKernelOpen already serve
them from host entropy. A read-only fopen of either path now returns a
stream whose fread fills the buffer with host entropy. setvbuf, feof,
ferror, clearerr, the stream locks and fclose work on it, fflush returns
0 as on a FreeBSD stream that is not writing, other stream functions
throw, and opening the paths for writing throws as in libkernel.

ProsperoTV (PPSA99003) reads its phone pairing code this way and showed
"Code expired or unavailable".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 03:01:38 +05:00
Adrià 130efc3886 Merge pull request #6152 from freshstart2066-create/feat/libc-copysign-clean
feat(libc): implement copysign and copysignf
2026-10-18 23:56:00 +02:00
hypermistandClaude Opus 5.5 e9f4dbfcf5 fix(libc): check the C11 runtime constraints in snprintf_s and vsnprintf_s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 23:43:55 +02:00
Adrià c7f67e5cf3 Merge pull request #6144 from freshstart2066-create/feat/libc-safe-wide-strings
feat(libc): implement safe wide string and concatenation functions
2026-10-18 23:26:38 +02:00
Adrià 1288433e8e Merge pull request #6184 from MarcZX10/codex/cache-inaccessible-guest-pages-6183
fix(agc): cache inaccessible guest pages
2026-10-18 22:37:09 +02:00
Dean e8ad642fe6 Merge pull request #6620 from hamb3r/perf/precise-sleep-until-qpc-fastpath
perf(libc): add steady_clock fast path in PreciseSleepUntil
2026-10-19 09:32:22 +13:00
BIGFERRY999 f7dce6e2d4 feat(libc): implement copysign and copysignf 2026-10-18 22:23:40 +02:00
Adrià ccf0f58785 Merge pull request #6228 from Ondra97/codex/fix-windows-directory-renames
fix(libkernel): preserve directory identity across Windows renames
2026-10-18 22:20:22 +02:00
Adrià f3059421f3 Merge pull request #6166 from freshstart2066-create/feat/libc-fabsf-fabsl
feat(libc): implement fabsf and fabsl
2026-10-18 22:09:51 +02:00
Adrià 48d61f53b4 Merge pull request #6217 from milescoviello/fix/libc-malloc-stats-default-heap
feat(libc): answer malloc_stats_fast for the default heap
2026-10-18 21:31:59 +02:00
Adrià c4c2b3aa73 Merge pull request #6211 from milescoviello/fix/libc-telldir-seekdir
feat(libc): implement telldir and seekdir
2026-10-18 20:58:31 +02:00
Adrià c73787f443 Merge pull request #6157 from freshstart2066-create/feat/libc-erf-erfc
feat(libc): implement erf, erfc, and erfcf
2026-10-18 20:49:50 +02:00
Dean 3dda12d1d3 Merge pull request #7562 from slick-daddy/fix/libc-pointer-formatting-7549
fix(libc): format %p the way the console's libc does
2026-10-19 07:24:48 +13:00
Adrià 023106ae4b Merge pull request #6159 from freshstart2066-create/feat/libc-ilogb
feat(libc): implement ilogb and ilogbf
2026-10-18 20:23:00 +02:00