Commit Graph
282 Commits
Author SHA1 Message Date
Dean dcd40e119d Merge pull request #8287 from mugurc/fix/tests-fenv-masks-rosetta
fix(tests): compare the floating-point exception masks with the ones the host keeps
2026-10-24 03:28:00 +13:00
Dean 65f1d28e7d Merge pull request #9109 from Retr0G28/fix/alias-trailing-slash-windows
fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
2026-10-24 02:08:03 +13:00
Dean 8dcbc4e5c9 Merge pull request #9643 from Noxy-HNR/fix/libc-float-domain-errors
fix(libc): preserve errno across fmodf domain errors
2026-10-24 02:03:09 +13:00
Dean be686ec858 Merge pull request #9642 from Noxy-HNR/fix/guest-byte-case-locale
fix(libc): isolate byte case comparisons from the host locale
2026-10-24 02:02:44 +13:00
Retr0 0f3d4bc9ee fix(libc): fail with ENOTDIR for a file named with a trailing slash on Windows
FreeBSD 11.4's lookup() (sys/kern/vfs_lookup.c) fails with ENOTDIR when
a path with a trailing slash ends at something that is not a directory.
On Windows a mount alias dropped the slash, and the host calls do not
report ENOTDIR for "file\", so unlink, rename and open acted on the file
or failed with EINVAL. Guest path resolution now rejects an existing
non-directory named with a trailing slash with ENOTDIR on every host, and
a mount alias keeps the slash on Windows as it does on Linux and macOS.
2026-10-23 08:21:01 +03:00
hypermist 3563fa21c4 Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte 2026-10-23 13:27:39 +13:00
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
Braxton Atkinson 07bec523ad docs(libc): separate byte-case compatibility note 2026-10-22 15:00:23 -05:00
Braxton Atkinson ee057ea155 fix(libc): preserve errno across fmodf domain errors 2026-10-22 14:59:20 -05:00
Braxton Atkinson 9b40e1e9b6 fix(libs): keep byte case comparisons in the guest C locale 2026-10-22 14:10:45 -05: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
mugurc 100148f762 fix(tests): expect the SSE traps the host keeps in the floating-point trap checks
The trap checks unmask exceptions with feenableexcept and its relatives
and expect MXCSR to hold the new masks, and the enable and disable
results to report the traps enabled on both units. Under Rosetta 2
MXCSR keeps its six exception masks set, so no SSE trap is ever enabled
and every result reports none. The test now asks the host once whether
it keeps an unmasked MXCSR exception and, where it does not, expects
all six SSE masks set and no trap on both units; on other hosts the
expectations are the same as before. A debt entry records that the
trap functions change only the x87 masks under Rosetta.
2026-10-22 13:00:10 +03:00
mugurc 65ba3a665f fix(tests): compare the floating-point exception masks with the ones the host keeps
Under Rosetta 2 the six MXCSR exception masks always read back set: a
write that unmasks an SSE exception is not kept, while the x87 masks and
the other MXCSR bits are. guest_floating_point unmasked the overflow
exception on both units and then expected MXCSR to equal the value it
wrote, so it failed on macOS although fesetexceptflag and feclearexcept
left the masks alone. The test now compares with the environment read
back after the write, which on other hosts is the value written. The
debt entry for the floating-point functions notes the Rosetta behaviour.
2026-10-22 13:00:10 +03:00
hypermistandClaude Opus 5.5 a37f8c630a docs(libc): record the bundled libc.prx UTF-8 default for the multibyte debt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:09:31 +13:00
hypermist 62feb8bfcc Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte 2026-10-22 22:08:17 +13: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
hypermistandClaude Opus 5.5 d1e66e95ca docs(libc): shorten the char16/char32 conversion entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 14:42:24 +13:00
hypermist 193d3c000d Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte 2026-10-22 14:30:27 +13: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
hypermistandClaude Opus 5.5 813f5c4cf9 docs(libc): leave the wcsrtombs_s entry to #7841
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 16:22:54 +13:00
hypermistandClaude Opus 5.5 65544dc239 fix(libc): stop wcstombs_s at its limit and keep wcsftime's null buffer
wcstombs_s ends without error when a character does not fit a limit
below the capacity, as the console's does; wcsrtombs_s still reports
ERANGE there. Both paths became reachable with UTF-8. wcsftime keeps
returning 0 for a null buffer, and the debt entries that described the
single-byte locale now describe the UTF-8 one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 16:21:23 +13:00
hypermist 04dc63a353 Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte
# Conflicts:
#	core/libs/prx/libc/src/Multibyte.cpp
2026-10-21 16:20:33 +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