Commit Graph
1089 Commits
Author SHA1 Message Date
bluandClaude Fable 5.1 0900ff6ff0 feat(libc): implement siginterrupt through the sigaction libkernel registers
siginterrupt is a libSceLibcInternal export (the public SDK's stub table has it there, not in the
kernel tables) and FreeBSD 11.4's lib/libc/gen/siginterrupt.c reads the signal's disposition,
sets or clears the signal's bit in _sigintr and SA_RESTART, and installs the disposition again.
libc cannot call libkernel, so, as the pthread hooks do, libc keeps a registered sigaction and
the address of the _sigintr set, and libkernel registers both from a static initializer when it
loads. A call before that throws; the set is written without libkernel's registration lock, as
FreeBSD's libc does. Builds on #8866, which adds the set.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 20:53:14 -07: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 d10d9d214c Merge pull request #8782 from valenciana-nc/fix/execute-once-independent-flags
fix(libc): avoid deadlocking independent once initializers
2026-10-21 15:27:24 +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 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
Dean 1ffe979127 Merge pull request #8576 from priyanshrv-netizen/feat/libc-float-characteristics
feat(libc): export the Dinkumware float characteristic tables
2026-10-21 14:06:48 +13:00
Dean 46c7538777 Merge pull request #7467 from Dripl1x/codex/windows-path-component-lookup
perf(libc): avoid repeated Windows path component scans
2026-10-21 13:57:05 +13:00
Dean 21a57ff5c0 Merge pull request #8570 from priyanshrv-netizen/feat/libc-dinkumware-constants
feat(libc): export the remaining Dinkumware floating-point constants
2026-10-21 13:29:16 +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 07c67a0d6d Merge pull request #8640 from Dom3005/fix/windows-open-symlink-loop-eloop
fix(libc): map a Windows symbolic link loop to ELOOP when opening
2026-10-21 13:13:01 +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
valenciana-nc 42412ac274 fix(libc): run once initializers outside the shared mutex 2026-10-20 18:06:49 -06:00
Dean 55027392ed Merge pull request #8535 from ycbuzi/pr/libc-fmax-signaling-nan
fix(libc): keep fmin and fmax quiet on a signalling NaN
2026-10-21 13:02:51 +13:00
Dean 5b59fbc553 Merge pull request #8389 from SwetabhSingh17/feat/libc-math-significand
feat(libc): implement significand
2026-10-21 12:40:42 +13:00
Dean c298bd3d57 Merge pull request #8446 from hypermoist/feat/libc-basename-r
feat(libc): implement basename_r
2026-10-21 12:40:20 +13:00
Dean f69bb8e4d4 Merge pull request #8440 from mazen320/fix/printf-alternate-octal-zero
fix(libc): preserve zero in alternate wide octal formatting
2026-10-21 12:40:10 +13:00
Dean 559f35d685 Merge pull request #8442 from hypermoist/feat/libc-fenv-traps
feat(libc): add the floating-point trap controls
2026-10-21 12:25:36 +13:00
Dean a8b92e43ce Merge pull request #8396 from Chuk49/feat/libc-wcstombs-s
feat(libc): export wcstombs_s
2026-10-21 12:21:12 +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
Dean 1bf237cc33 Merge pull request #8379 from hypermoist/fix/libc-strtod-subnormal-errno
fix(libc): leave errno alone for subnormal strtod results
2026-10-21 12:14:17 +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
Dean e25333e39a Merge pull request #8600 from ebarr24/ws/libc-fopen-streams
fix(libc): share delete access when freopen reopens a stream onto a file on Windows
2026-10-21 11:24:47 +13:00
Dean 466ce3ac45 Merge pull request #7474 from Dripl1x/codex/ui-lab-immediate-exit-cache
fix(agc): preserve pipeline caches on immediate guest exit
2026-10-21 11:23:40 +13: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
Dom3005andClaude Opus 5.5 1af777afb1 fix(libc): map a Windows symbolic link loop to ELOOP when opening
CreateFileW fails a symbolic link that resolves to itself with
ERROR_CANT_RESOLVE_FILENAME (1921). WindowsOpenError_nid_no_patch had no
case for it, so sceKernelOpen, open and fopen reported EINVAL where
FreeBSD reports ELOOP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 22:18:21 +02: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
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
hamb3r 50a4d5bfb3 chore(libc): merge main into feat/libc-backtrace-windows 2026-10-20 22:04:09 +03:00
Dean b85d972f42 Merge pull request #7897 from babyhuey/fix/libc-adopt-guest-heap-only-when-replaced
fix(libc): adopt the guest SDK allocator only when the title replaces the heap
2026-10-21 07:20:48 +13:00
Dean 8727ddb29e Merge pull request #8579 from priyanshrv-netizen/feat/libc-feraise
feat(libc): implement _Feraise
2026-10-21 07:02:45 +13:00
Dean Galvin 143ed02750 Merge branch 'main' into #7417
Resolve docs/dev/debt/libc.md: keep main's _Throw_Cpp_error entry and this branch's call tracing entry.
2026-10-21 06:33:59 +13:00
Sam fa379c0766 Merge remote-tracking branch 'origin/main' into feat/libc-wcstombs-s
# Conflicts:
#	core/libs/prx/libSceAmpr/Export.cpp
2026-10-20 19:28:46 +02:00
Dean 542c65d74c Merge pull request #8023 from Ondra97/codex/fix-scaled-hyperbolic
fix(libc): avoid premature scaled hyperbolic overflow
2026-10-21 06:26:06 +13:00
Dean 0b1d678fe5 Merge pull request #8148 from hamb3r/feat/libc-dinkumware-threads
feat(libc): export Dinkumware thread primitives from libc.prx
2026-10-21 06:21:49 +13:00
priyanshrv-netizenandClaude Opus 5.5 e1018840e3 feat(libc): implement _Feraise
Raise the requested floating-point exceptions on the x87 and SSE units
and set errno as the console's libc.prx does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:38:30 +05:30
priyanshrv-netizenandClaude Opus 5.5 97d587f730 feat(libc): export the Dinkumware float characteristic tables
Add _Flt, _Dbl and _Ldbl, the 80-byte tables behind Dinkumware's
float.h macros, with the values the console's libc.prx exports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:28:18 +05:30
priyanshrv-netizenandClaude Opus 5.5 91c401db5e feat(libc): export the remaining Dinkumware floating-point constants
Add _Denorm, _Hugeval, _Nan, _Snan, _FDenorm, _FSnan, _LDenorm, _LInf,
_LNan and _LSnan with the 16 bytes the console's libc.prx exports.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 22:15:51 +05:30
Dean 77e31219c8 Merge pull request #8116 from dantdmdarealguy/fix/libc-readdir-fileno-windows
fix(libc): report the file number of each readdir entry on Windows
2026-10-21 04:55:57 +13:00
Adrià 286908f918 Merge pull request #7615 from XD3V3LOP3RX/codex/windows-remap-write-watch
fix(windows): restore write tracking after resident direct remaps
2026-10-20 17:06:48 +02:00
Adrià 7526640c3c Merge pull request #7839 from hypermoist/feat/libc-reentrant-time-xtime
feat(libc): implement gmtime_r, localtime_r, timegm and the Dinkumware xtime helpers
2026-10-20 16:47:07 +02:00
Adrià 576b4b94b2 Merge pull request #7873 from whamre/feat/hang-dump-stack-candidates
feat(libc): list stack return address candidates in the hang dump
2026-10-20 16:20:04 +02:00
Dean cabd80f472 Merge pull request #8358 from xXPBSXx/fix/libc-rename-source-first
fix(libc): resolve the rename source before the destination argument
2026-10-21 02:30:34 +13:00
Dean 44e3389c88 Merge pull request #7807 from mazen320/fix/windows-stderr-dup2
fix(libkernel): keep host stderr off a guest dup2 onto descriptor 2
2026-10-21 01:45:30 +13:00
hypermistandClaude Opus 5.5 34e8cf1e14 feat(libc): implement basename_r
basename_r writes basename's result into the caller's buffer;
basename now uses it with its per-thread buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:44:56 +13:00
Swetabh Singh f3dec86695 feat(libc): implement memmem and memccpy 2026-10-20 18:12:52 +05:30
hypermistandClaude Opus 5.5 bf6f9cc3e2 feat(libc): add the floating-point trap controls
feenableexcept, fedisableexcept, their __ forms, fegettrapenable and
fesettrapenable unmask or mask exceptions in the x87 control word and
MXCSR, with the console's return values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:41:54 +13:00
Maz 3810389c94 fix(libc): preserve zero in alternate wide octal formatting 2026-10-20 16:36:32 +04:00