Commit Graph
789 Commits
Author SHA1 Message Date
Dean b2620e56d1 Merge pull request #11733 from verusferro/feat/libc-wide-string-to-number
feat(libc): convert wide strings with _WStoull, _WStoll, _WStod, _WStof and _WStold as the console's libc does
2026-11-02 00:33:30 +13:00
Adrià a644edf30c Merge pull request #13499 from Gonic0/feat/agc-label-read-trap
perf(agc): trap CPU reads of label readbacks on macOS instead of storing them
2026-11-01 11:09:34 +01:00
Adrià 26fa1212b8 Merge pull request #13819 from Ninot1Quyi/fix/libc-nearbyint-inexact
fix(libc): match nearbyint inexact flags to guest libc
2026-11-01 09:56:57 +01:00
Adrià 5c9837bfe7 Merge pull request #13442 from Gonic0/feat/libc-write-watch-read-trap
feat(libc): trap guest reads of write-watched pages on macOS
2026-11-01 09:13:34 +01:00
Adrià 53fbe59956 Merge pull request #13732 from SnekPolylepis/feat/libc-radix64-conversions
feat(libc): implement a64l, l64a, and l64a_r radix-64 integer conversions
2026-11-01 08:30:07 +01:00
Qu Yi 4a65ddf97c chore(libc): synchronize nearbyint fix with main
Preserve the nearbyint implementation and regression coverage while incorporating current main. The write-watch registration prerequisite is now part of main.

Validation: freshly compiled production MathExact.cpp regression passes; ASan/UBSan passes with detect_leaks=0. The same fixture compiles against main Math.cpp and fails at the FE_INEXACT assertion (exit 134). Conventions, whitespace and 235 script registrations pass. Full product build and full CTest were not rerun for this synchronization.
2026-11-01 14:56:40 +08:00
Dean 0b2c52e9c2 Merge pull request #12597 from JJenkx/windows/libc-fopen-s-constraints
fix(libc): report fopen_s and freopen_s argument errors to the constraint handler
2026-11-01 19:48:43 +13:00
Nicolas GonzalezandClaude Opus 5.5 2cf5b41ec8 perf(agc): trap CPU reads of label readbacks on macOS instead of storing them
Before a label, a pending linear or small storage image that shares no page
with another pending or storing image now gets a write-watch read trap
instead of its store. The first access to its pages stores it through the
host-read hook; any other store releases the trap first.
APS5_NO_LABEL_READ_TRAP=1 keeps the store at the label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:37:51 -03:00
Nicolas GonzalezandClaude Opus 5.5 6b16f90d5a feat(libc): trap guest reads of write-watched pages on macOS
GuestWriteWatchTrapReads takes all access to the pages of a range until
the resolver set with GuestWriteWatchSetReadTrapResolver has run for it.
A fault on a trapped page waits while the resolver runs on the watch's
own thread; host writes and GuestWriteWatchProtect run it first on the
calling thread. Collections keep trapped pages inaccessible, and
registering or unregistering memory drops its traps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 07:33:02 +01:00
Dean 803889adab Merge pull request #8937 from UnhealthyKraken/feat/libc-fesetenv
feat(libc): implement fesetenv
2026-11-01 19:16:41 +13:00
SnekPolylepisandClaude Opus 5.5 23bff0dd7d fix(libc): match FreeBSD a64l and l64a_r, use HostThreadLocal for l64a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 00:18:47 -05:00
Nicolas GonzalezandClaude Opus 5.5 132bceac18 Merge remote-tracking branch 'upstream/main' into perf/libc-write-watch-fault-ahead
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 00:49:29 -03:00
Dean 88b7503129 Merge pull request #10222 from JJenkx/windows/libc-expm1f-msun
fix(libc): compute expm1f with FreeBSD msun's algorithm, as titles' libc.prx does
2026-11-01 14:57:48 +13:00
Qu Yi 4c41442276 fix(libc): match nearbyint inexact flags to guest libc 2026-10-31 15:51:17 +08:00
Nicolas GonzalezandClaude Opus 5.5 2c15fa59b4 fix(libc): keep write-watch fault-ahead inside the faulting page's 64 KiB block
libSceAgcDriver decides per 64 KiB block whether a pending storage image
keeps the CPU's bytes. A window that ran into the next block marked it
CPU-written and dropped the GPU results there (agc_storage_write_back,
agc_idle_publish_wait, array layer and depth plane tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 02:32:46 -03:00
Zain 02bcf26141 feat(libc): implement a64l, l64a, and l64a_r radix-64 integer conversions 2026-10-30 21:54:02 -05:00
Nicolas GonzalezandClaude Opus 5.5 54080056ff perf(libc): unprotect the pages ahead of a sequential write fault on macOS
A guest thread that writes a large watched range in order takes one
write-watch fault per page. Under Rosetta 2 each fault is a Mach
exception round trip. When the two pages before the faulting one were
written since the last collection, the handler now unprotects up to 32
pages from it that have the same protection and records them as
written. APS5_WRITE_WATCH_FAULT_AHEAD sets the count; 0 or 1 keeps one
page per fault.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 23:13:12 -03:00
Adrià 21a556f567 Merge pull request #12553 from JJenkx/codex/libc-unscaled-hex-parser-20261028
fix(libc): match unscaled hexadecimal Dinkumware conversion
2026-10-30 21:24:48 +01:00
Adrià 91cd8ac6fd Merge pull request #13049 from JJenkx/fix/libc-character-scan-lengths
fix(libc): ignore non-wide lengths on character scans
2026-10-30 16:25:56 +01:00
Adrià 280bbad426 Merge pull request #12659 from JJenkx/codex/libc-scaled-nan-subject-20261028
fix(libc): parse scaled NaN subjects without numeric conversion
2026-10-30 13:45:37 +01:00
Adrià cc7e348334 Merge pull request #12524 from JJenkx/codex/libc-unscaled-hex-range-20261028
fix(libc): preserve errno for unscaled hexadecimal range results
2026-10-30 13:05:20 +01:00
Dean 99f7b51d2b Merge pull request #12541 from oneandonlydean/licence-notices-ported-code
docs(libc): add upstream licence notices to ported math and siglist code
2026-10-31 00:50:17 +13:00
Adrià 8304ccaedb Merge pull request #11341 from SteelCrab/review/emscripten-libraries
build(libs): support Emscripten memory64 compilation
2026-10-30 12:49:20 +01:00
JJenkx 74fceb9201 fix(libc): retain current main logb debt in math stack 2026-10-30 07:39:24 -04:00
JJenkx 250f5b51de fix(libc): integrate expm1f on refreshed tanhf parent 2026-10-30 07:33:46 -04:00
JJenkx a06ed844e3 fix(libc): integrate current main into tanhf port 2026-10-30 07:32:57 -04:00
Adrià b3773d1a18 Merge pull request #12589 from JJenkx/windows/libc-strerror-s-constraints
fix(libc): report strerror_s violations as titles' libc.prx does
2026-10-30 10:19:26 +01:00
Adrià 1764ec5c60 Merge pull request #12420 from JJenkx/windows/libc-swscanf-ranges
fix(libc): read swscanf scanset ranges and string lengths as titles do
2026-10-30 07:16:41 +01:00
Adrià 0362b1521c Merge pull request #12861 from heditrigui/feat/libc-recallocarray
feat(libc): implement recallocarray
2026-10-30 06:36:10 +01:00
Adrià 0a2cda921d Merge pull request #12933 from heditrigui/feat/libc-dprintf
feat(libc): implement dprintf and vdprintf
2026-10-30 06:33:00 +01:00
Adrià 84368bddb2 Merge pull request #12160 from AlexFigas/feat/libc-pmr-resources
feat(libc): provide the pmr new-delete, null and default memory resources
2026-10-30 06:30:55 +01:00
Adrià 902c6ebfe9 Merge pull request #12111 from wanderingbug/cursor/upstream-macos-unwind-e22f
fix(libc): walk the Mach-O compact unwind index
2026-10-30 05:52:53 +01:00
Adrià b48afc66fb Merge pull request #12845 from heditrigui/feat/libc-qsort-r
feat(libc): implement qsort_r
2026-10-30 05:52:07 +01:00
Adrià 84e114e4eb Merge pull request #12715 from MarcZX10/feat/log-to-file
feat(libc): copy the runtime log into a file with ANYPS5_LOG_FILE
2026-10-30 05:51:34 +01:00
JJenkx 1768c1821b fix: integrate current main into PR #12597 2026-10-29 23:20:02 -04:00
JJenkx 58fddd82c6 fix: integrate current main into PR #12659 2026-10-29 23:20:02 -04:00
pista 98248606d4 fix(libs): reject host region release on WebAssembly 2026-10-30 10:50:58 +09:00
pista e427bd0567 docs(libs): record WebAssembly host limitations 2026-10-30 10:50:57 +09:00
pista baedb114f9 test(libs): build Emscripten adapters and check guest long doubles in CI 2026-10-30 10:50:57 +09:00
Adrià 18bf374028 Merge pull request #12178 from Henryisdjfunkyho/fix/libc-nearbyintf-current
fix(libc): raise inexact for nearbyintf
2026-10-30 02:00:49 +01:00
Adrià 76fd1c09e9 Merge pull request #11270 from AlexFigas/fix/libc-llog-dinkumware
fix(libc): compute _LLog with the bundled libc.prx's Dinkumware code
2026-10-30 01:40:35 +01:00
Adrià 96613bba67 Merge pull request #12060 from Ragbie/fix/windows-directory-flock
fix(libkernel): lock directories with flock on Windows as FreeBSD does
2026-10-30 01:04:03 +01:00
JJenkx ce32d855ba fix(libc): ignore non-wide lengths on character scans 2026-10-29 19:33:32 -04:00
Adrià 5e216d6aed Merge pull request #10927 from edubox/feat/libc-throw-bad-array-new-length
feat(libc): implement std::_Throw(const std::bad_array_new_length&)
2026-10-30 00:18:44 +01:00
Adrià 202037c3d7 Merge pull request #12691 from JJenkx/codex/libc-bsearch-zero-stride-20261029
fix(libc): allow zero-stride bsearch_s as bundled libc does
2026-10-30 00:18:02 +01:00
Adrià e1dd37721c Merge pull request #12555 from JJenkx/codex/libc-fltrounds-x87-20261028
fix(libc): read x87 rounding in _Fltrounds
2026-10-29 23:28:14 +01:00
JJenkxandClaude Opus 5.5 fb4fb58c87 fix(libc): report strerror_s violations as titles' libc.prx does
The libc.prx that titles ship (PPSA07923, PPSA05916) rejects a
strerror_s capacity above SIZE_MAX >> 3, not SIZE_MAX >> 1, and calls
the constraint handler with "strerror_s: bad argument", EINVAL and a
null pointer for a null destination, a capacity of 0 or one past that
limit. main passed "strerror_s" and the destination, and wrote the
message for a capacity from 2^61 up.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 23:16:52 +01:00
Adrià 4740534186 Merge pull request #12527 from JJenkx/windows/libc-strerror-extended
fix(libc): name the extended errno values in strerror as titles' libc.prx does
2026-10-29 23:01:08 +01:00
Adrià cbc39db363 Merge pull request #12117 from plexerPK/codex/macos-write-watch-nonwrite-faults
fix(libc): forward non-write faults from watched macOS pages
2026-10-29 21:20:52 +01:00
Dean Galvin 75fd07f2d3 docs(libc): record that the licence notices are comments required by upstream 2026-10-30 07:45:55 +13:00