Commit Graph
263 Commits
Author SHA1 Message Date
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
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
Adrià cbcb083086 Merge pull request #9296 from superhe11/codex/fix-snprintf-size-overflow
fix(libc): reject snprintf capacities above INT_MAX + 1
2026-10-22 20:29:27 +02:00
Adrià FranchandClaude e8c73627f6 fix(libc): keep %% at end of input an input failure in the wide scanner
Co-Authored-By: Claude <[email protected]>
2026-10-22 20:11:40 +02:00
MarcZX10 0d70810529 docs(libc): record remaining wide scanner evidence gap 2026-10-22 20:11:32 +02:00
Adrià a6646f8464 Merge pull request #9071 from MarcZX10/marc/libc-cosh-9062
feat(libc): implement _Cosh
2026-10-22 19:52:15 +02:00
Adrià 9062485ebe Merge pull request #8880 from ycbuzi/feat/libc-num-get-objects
feat(libc): export the num_get and time_get locale objects as data
2026-10-22 19:44:08 +02:00
Dean 746bdd8041 Merge pull request #8550 from Retr0G28/fix/fopen-directory-read-windows
fix(libc): open a directory with fopen in a read mode on Windows
2026-10-22 17:22:22 +13:00
Kang, Harry Zixuan 726edc503b feat(windows): support MSYS2 GCC runtime builds 2026-10-21 20:29:55 -07:00
MarcZX10 72316ad618 fix(libc): scale large finite cosh inputs 2026-10-21 22:59:10 +00:00
MarcZX10 c9b80f0304 feat(libc): implement _Cosh 2026-10-21 22:58:44 +00:00
bluandClaude Opus 5.5 6287af9657 docs(libc): name the num_get<char> vtable's slots from the console
mazen320 mapped the relocated slots of KfcTPbeaOqg in the console's
libSceLibcInternal: offset-to-top, typeinfo, the two destructors,
locale::facet::_Incref and _Decref, and the eleven do_get. The debt
entry now says so instead of leaving the two extra entries unknown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 14:56:43 -07:00
bluandClaude Opus 5.5 428e9cb5f3 fix(libc): size the num_get<char> vtable to the console's 17 slots
mazen320 read KfcTPbeaOqg from the console's libSceLibcInternal.sprx
symbol table: an object of 136 bytes, 17 pointer slots. Export that
size instead of the 15 derived from Dinkumware's crt.vc12 xlocnum, and
say in the debt entry that which two virtual functions are added is
not known.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 13:45:04 -07:00
bluandClaude Opus 5.5 a946c469d6 Merge upstream main into feat/libc-num-get-objects
Resolves the conflict with #8867 in EntryStubTests.cpp: keep its two
kernel-variant tests and the BufferUtils include, and this branch's
libSceAmpr-to-libc fallback test, with all three called from main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 12:33:11 -07:00
Adrià 6b6c701636 Merge pull request #8941 from xXPBSXx/docs/debt-snwprintf-s-handler
docs(debt): say that snwprintf_s does not invoke the exported constraint handler
2026-10-21 20:12:23 +02:00
Superhe11 595dcacdf2 docs(libc): avoid competing debt insertions at the section start 2026-10-21 21:08:18 +03:00
Superhe11 eecffc924b test(libc): cover snprintf size bounds and formatting side effects 2026-10-21 20:34:41 +03:00
Retr0 36226741f5 fix(libc): open a directory with fopen in a read mode on Windows
FreeBSD 11 fopen opens the path with _open, and vn_open_vnode refuses a
directory only for FWRITE or O_TRUNC, so fopen of a directory in a read
mode succeeds; Linux hosts already open it. On Windows CreateFileW
without FILE_FLAG_BACKUP_SEMANTICS refused it with EACCES.

fopen now opens such a path as a libkernel directory descriptor, which
libkernel registers in libc when it loads, and fclose and freopen remove
it from libkernel's table. Reads on the stream fail with EISDIR and set
the error indicator, as on a Linux host and FreeBSD's tmpfs: the Windows
CRT fails them already but reports EINVAL. Writes fail with EBADF, and
fseek, ftell and ungetc work, as on any read-only stream.
2026-10-21 14:48:37 +03:00
Adrià 59776f2e6a Merge pull request #7841 from hypermoist/feat/libc-annex-k-remaining
feat(libc): implement the remaining C11 Annex K bounds-checking functions
2026-10-21 13:09:59 +02:00
Adrià eb4a7fee4e Merge pull request #7525 from AlexOfTheForest/feat/scanf-wide-linux
feat(libc): scan 16-bit wide conversions in the sscanf family on Linux
2026-10-21 13:09:54 +02:00
Dean f894ba69d3 Merge pull request #8479 from hypermoist/feat/libc-wide-stream-scanf
feat(libc): add the wide stream scanf family
2026-10-21 20:58:24 +13:00
Dean b77bd58806 Merge pull request #8226 from dantdmdarealguy/fix/libc-update-stream-read-windows
fix(libc): switch update streams to reading as FreeBSD does
2026-10-21 19:57:35 +13:00
Dean 5b5d2a8636 Merge pull request #8626 from xXPBSXx/carry/6226-relinker-stem
fix(libc): find a relinked module by stem when the exact name misses (carries #6226)
2026-10-21 19:52:46 +13:00
xXPBSXxandClaude Sonnet 5.5 ee1bd9fbcb docs(debt): say that snwprintf_s does not invoke the exported constraint handler
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 08:49:56 +02:00
bluandClaude Fable 5.1 46c36c304f feat(libc): export the num_get and time_get locale objects as data
The public SDK's libSceLibcInternal table declares num_get<char>::id, time_get<char>::id and the
num_get<char> vtable as objects; libSceAmpr exported their NIDs as functions that throw, which a
data consumer reads as code (#8875). libc now defines them the way the other facet ids and the
num_put and codecvt vtables are kept: the ids zero, the vtable 15 zeroed slots (two header
entries, the two destructor entries and Dinkumware's eleven do_get), and libSceAmpr drops the
functions. An import qualified to libSceAmpr.prx falls back to libc, so each object has one
identity.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 21:13:08 -07:00
hypermistandClaude Opus 5.5 7b336bedac docs(libc): move the Annex K locale entry before wcsrtombs_s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 16:23:56 +13:00
Dean 2ea908a9ae Merge pull request #8841 from oneandonlydean/docs/host-write-rule
docs(dev): require a HostWrite bracket around host writes into guest memory
2026-10-21 15:44:14 +13:00
Dean 5d10ea9ea0 Merge pull request #8791 from JJenkx/windows/calltrace-faulting-thread
feat(libc): list the reporting thread's own calls in the call trace report
2026-10-21 15:40:39 +13:00
Dean Galvin 05d7bdb088 docs(dev): require a HostWrite bracket around host writes into guest memory
Kernel and native-library writes into guest pages the write watch left read-only fail with EFAULT on macOS and ERROR_NOACCESS on Windows (#7473). State the rule where contributors look and point the macOS write-watch debt entry at it.
2026-10-21 14:57:32 +13:00
Dean GalvinandxXPBSXx 8cb7251b2e Merge origin/main into PR 8626
Co-authored-by: xXPBSXx <[email protected]>
2026-10-21 14:56:22 +13:00
Dean b13183e59e Merge pull request #7473 from Dripl1x/codex/skip-clean-resident-write-watch
perf(libc): skip write-watch queries for proven clean resident ranges
2026-10-21 14:55:09 +13:00
Dean 6c12024f7d Merge pull request #8741 from Queuse/fix/libc-freopen-share-delete
fix(libc): share delete on standard stream reopen
2026-10-21 14:47:29 +13:00
Dean 994829e44b Merge pull request #8733 from p3n1cillin/codex/libc-unlocked-status-20261020
feat(libc): implement unlocked stream status queries
2026-10-21 14:24:31 +13:00
JJenkxandClaude Opus 5.5 3316ca3b24 feat(libc): list the reporting thread's own calls in the call trace report
The crash and abort reports printed the last 64 traced calls of the whole
process, so a thread that loops on a traced import (a mutex lock/unlock
pair, a profiler marker) pushes the calls of the faulting thread out of the
report. The ring already keeps the last 65536 calls with their thread.

CopyThreadCallTrace_nid_no_patch returns the most recent calls of one
thread from that ring, oldest first, and both reports (Windows crash and
abort, Linux abort) list up to 32 of them for the reporting thread after
the process-wide list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:25:31 -04:00
Dean b56cfb3817 Merge pull request #8444 from SwetabhSingh17/feat/libc-mem-utilities
feat(libc): implement memmem and memccpy
2026-10-21 13:24:46 +13:00
Dean 70c497739e Merge pull request #8636 from cadenasynyster/fix/libc-thrd-detach
feat(libc): implement _Thrd_detach
2026-10-21 13:11:55 +13:00
hypermist 8baefcf14c Merge remote-tracking branch 'upstream/main' into feat/libc-annex-k-remaining 2026-10-21 12:43:56 +13:00
hypermistandClaude Opus 5.5 6f77c09bd7 docs(libc): record the single-byte locale gap of the Annex K conversions
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 12:23:51 +13:00
Dean 273b1b87f4 Merge pull request #8388 from SwetabhSingh17/feat/libc-paf-mspace-posix-memalign
feat(libc): implement sceLibcPafMspacePosixMemalign
2026-10-21 12:20:57 +13:00
hypermistandClaude Opus 5.5 e321a04dca docs(libc): move the _Stod debt entry clear of open edits
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 12:07:18 +13:00
Queuze 3916eeaf6f fix(libc): share delete on standard stream reopen 2026-10-20 20:07:16 -03:00
hypermist 31dd2c3088 Merge remote-tracking branch 'upstream/main' into feat/libc-dinkumware-dispatchers 2026-10-21 12:04:58 +13:00
hypermistandClaude Opus 5.5 c5415e0845 fix(libc): rescale _Stod text that overflows before scaling
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 11:58:08 +13:00
Dean c8301bbca5 Merge pull request #8137 from hamb3r/feat/libc-backtrace-windows
feat(libc): implement sceLibcBacktraceSelf and GetBufferSize on Windows
2026-10-21 11:45:25 +13:00
p3nicillin dde6b34d37 feat(libc): implement unlocked stream status queries 2026-10-20 23:41:22 +01:00
Ethan Barr 4f6a37d790 fix(libc): share delete access when freopen reopens a stream onto a file on Windows
On Windows, freopen reopened a stream through _wfreopen, which opens the file without FILE_SHARE_DELETE, so remove or rename of the file failed while the stream was open, unlike fopen streams and POSIX unlink/rename of an open file. freopen now closes the previous stream and opens the new file through the same CreateFileW path fopen uses, so the reopened stream shares delete access. Host standard streams and an empty filename keep the _wfreopen path. Reference: FreeBSD 11 unlink(2) and rename(2) succeed on a file that is open.
2026-10-20 17:07:21 -04:00
Dean 29e4c46b4d Merge pull request #7417 from IshmamDC217/feat/relinker-trace-imports-linux
feat(relinker): support --trace-imports for Linux output
2026-10-21 09:03:29 +13:00
Evgeniy Kazarin 7898b5bd3a fix(libc): avoid repeated resident write faults 2026-10-21 03:55:51 +08:00
cadenasynyster 9e6544fbab docs(libc): shorten the _Thrd_detach debt entry 2026-10-20 21:43:57 +02:00
cadenasynysterandClaude Sonnet 5.5 a8b6d1c411 feat(libc): implement _Thrd_detach
Animal Well (PPSA22520) imports _Thrd_detach (L7f7zYwBvZA) from libc.prx and nothing exports it, so the Windows loader stops at startup. Register libkernel's pthread_detach with libc like pthread_create and pthread_join, and return _Thrd_error (4) when it fails.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
2026-10-20 21:31:16 +02:00