Commit Graph
129 Commits
Author SHA1 Message Date
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
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à 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
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 <noreply@anthropic.com>
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à 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
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à 3aebaa7de6 Merge pull request #6124 from yripper/feat/macos-guest-arena
feat(libc): reserve the guest arena on macOS
2026-10-18 19:09:43 +02:00
Adrià e1dae23e01 Merge pull request #6107 from YossiYad/fix/libc-closed-standard-descriptors
fix(libc): open closed standard descriptors on /dev/null when libc loads
2026-10-18 18:58:19 +02:00
Adrià 81cb863394 Merge pull request #6061 from wachi35676/fix/libc-drive-component-under-mount
fix(libc): keep a drive-letter component of a guest path under its mount on Windows
2026-10-18 17:51:46 +02:00
Slick Daddy 536fef3228 fix(libc): format %p the way the console's libc does
The console's libSceLibcInternal.sprx (measured on firmware 12.70 in
#7549) prints %p as bare lowercase hex without a 0x prefix, prints 0 for
a null pointer, ignores #, + and the space flag, counts only the digits
towards the width, pads with spaces on the left (on the right for - and
with zeros for 0 when there is no precision), treats the precision as
the minimum number of digits, prints nothing for a null pointer under
%.0p, and accepts the l length. FormatPointer instead followed FreeBSD
and printed 0x..., which is what a title does not see on hardware.

FormatPointer now prints the digits alone, the narrow Windows formatter
accepts %lp, and Linux routes %p and %lp to the guest formatter instead
of glibc, which prints the FreeBSD form and (nil) for a null pointer.
The wide family still refuses %lp, because the console's swprintf was
not measured with it; it returns -1 as it does for any other conversion
the formatter rejects. The debt note records the pointer cases the
console was not measured with and what the Linux routing means for a
format that mixes %p with a refused conversion.
2026-10-18 16:59:34 +03:00
Dean d9656f1283 Merge pull request #7353 from T3cm0/bionic/mergesort
feat(libc): implement mergesort
2026-10-18 16:22:12 +13:00
Dean 3ef424a7f6 Merge pull request #7348 from T3cm0/bionic/paf-mspace
feat(libc): implement the sceLibcPafMspace allocation exports
2026-10-18 15:52:13 +13:00
Dean b39d90bf14 Merge pull request #7357 from T3cm0/bionic/seed48-lcong48
feat(libc): implement seed48 and lcong48
2026-10-18 15:20:36 +13:00
Dean 5cc435f02f Merge pull request #7355 from T3cm0/bionic/uchar-conversions
feat(libc): implement the uchar.h conversions, mblen and wctomb
2026-10-18 15:20:29 +13:00
T3cm0andClaude Opus 5.5 26898755e5 feat(libc): implement seed48 and lcong48
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:44:32 -05:00
T3cm0andClaude Opus 5.5 58697488a2 feat(libc): implement the uchar.h conversions, mblen and wctomb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:43:39 -05:00
T3cm0andClaude Opus 5.5 24a999c499 feat(libc): implement long double, Bessel and integer math exports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:43:13 -05:00
T3cm0andClaude Opus 5.5 8283831a19 feat(libc): implement mergesort
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:42:46 -05:00
T3cm0andClaude Opus 5.5 66247cef5c feat(libc): implement the sceLibcPafMspace allocation exports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:40:58 -05:00
Dean eeea684a0b Merge pull request #7280 from T3cm0/bionic/mspace-reallocalign-order
fix(libc): take sceLibcMspaceReallocalign's alignment before its size
2026-10-18 13:26:35 +13:00
Dean 6eea4e0c2e Merge pull request #7282 from T3cm0/bionic/unlocked-stream-queries
feat(libc): implement clearerr_unlocked, fileno_unlocked and fgetln
2026-10-18 13:26:31 +13:00
Dean 8532632d4e Merge pull request #7249 from Lorkydey/feat/libc-binary-word-io
feat(libc): implement getw and putw
2026-10-18 10:18:50 +13:00
T3cm0andClaude Opus 5.5 22c584acd3 feat(libc): implement clearerr_unlocked, fileno_unlocked and fgetln
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:17:27 -05:00
T3cm0andClaude Opus 5.5 3802f887f2 fix(libc): take sceLibcMspaceReallocalign's alignment before its size
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:17:22 -05:00
Dean cf217c51c6 Merge pull request #7211 from simonbronk/codex/secure-scan-null-20261017
fix(libc): reject null secure scan destinations
2026-10-18 10:16:38 +13:00
milescovielloandClaude Opus 5.5 dde480e6c8 feat(libc): answer malloc_stats_fast for the default heap
Ship of Harkinian (PPSA99320) logs its heap use with malloc_stats_fast
every 10 s and stopped on the first call, since only an application
allocator could answer it. The default heap now keeps its system and
in-use byte counts with their peaks and fills the same managed-size
block as sceLibcMspaceMallocStatsFast, whose layout moves to a shared
header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:43:32 +00:00
Dean 0f0d4004a4 Merge pull request #6517 from Wild-Badger/fix/libc-wide-collate-layout
fix(libc): count wide collate string elements
2026-10-18 09:41:21 +13:00
lorkydey 7c07ebd095 feat(libc): implement getw and putw 2026-10-17 21:28:18 +02:00
Adrià 5859889b29 Merge pull request #6133 from AkulTyagi11/feat/libc-modti3
feat(libc): implement __modti3
2026-10-17 21:06:42 +02:00
simonbronk f0d68fb436 fix(libc): reject null secure scan destinations
Prevent reached null conversion destinations from crashing sscanf_s and vsscanf_s. Return EOF before writes and retain earlier assignments. Add regression coverage through both guest ABI entry points.

AI-assisted: yes (OpenAI Codex). Windows WinLibs GCC 15.2 Release: production baseline crashes with the new regression; fixed shared libc passes guest_scan_count, guest_formatting, guest_wide_formatting and guest_strings (4/4). Conventions pass. Full all-target build was deliberately stopped after 83s with 3691 pending targets, not completed. No title or console run; constraint-handler invocation remains unimplemented as documented. No performance or coverage-percentage claim.
2026-10-17 18:46:36 +02:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 78cabf5dcd fix(libc): keep a drive-letter component of a guest path under its mount on Windows
A guest path is resolved by appending its components to the host root or
to a mount alias directory through std::filesystem::path. On Windows a
component such as "C:" that came first in the appended part was parsed as
a root name, so operator/ replaced the host directory instead of
appending: "/savedata0/C:/Windows/win.ini" and "/app0/../C:/Windows/win.ini"
resolved to "C:\Windows\win.ini", and "/C:/x" lost the component and
resolved to "<root>\x". A colon is an ordinary character in a FreeBSD
file name, so those names belong under the mount.

Guest paths are now split into component names and joined to the host
directory as text. Explicit native drive paths are still passed through.
On NTFS a name containing ":" still opens an alternate data stream; the
libc debt list now records it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:22:08 +05:00
Dean 66702f1cff Merge pull request #7060 from Aryansh1520/fix/libc-backtrace-self-linux
feat(libc): implement sceLibcBacktraceSelf and GetBufferSize on Linux
2026-10-18 04:49:45 +13:00
Dean 7b763e6359 Merge pull request #7068 from AlexOfTheForest/fix/fopen-errno
fix(libc): translate host errno from fopen, freopen and fopen_s
2026-10-18 04:49:08 +13:00
Dean 05b235498a Merge pull request #7099 from Lorkydey/feat/libc-safe-error-messages
feat(libc): implement bounded error message APIs
2026-10-18 01:58:23 +13:00
Dean df92748a30 Merge pull request #6318 from hypermoist/fix/libc-lgamma-signgam
fix(libc): store the sign of gamma in an exported signgam from lgamma
2026-10-18 00:32:04 +13:00
lorkydey 14acf7f444 feat(libc): implement bounded error message APIs 2026-10-17 13:26:23 +02:00
Alexej Szpevák 5433b32b7d fix(libc): return the open error from fopen_s instead of ENOENT
fopen_s returned ENOENT for every failed open, including an invalid mode, a directory opened for writing and the loop and long-name cases. C11 K.3.5.2.1 only asks for a nonzero value; Microsoft's CRT, which shares Dinkumware's library, returns errno. fopen_s now returns the errno fopen set.
2026-10-17 11:52:14 +02:00
Aryan Sharma 2e0d310c91 docs(debt): link the backtrace entry from its debt file 2026-10-17 14:57:32 +05:30
Aryan Sharma ec832e0bcb fix(libc): limit sceLibcBacktraceSelf to Linux and test its record layout 2026-10-17 14:56:56 +05:30
Aryan Sharma ce57c2d799 feat(libc): implement sceLibcBacktraceSelf on Linux
PPSA28997 (IL2CPP) calls sceLibcBacktraceGetBufferSize and
sceLibcBacktraceSelf. On Linux the host call stack is captured with
backtrace and each frame is resolved to its module and offset with
dladdr, then written as a linked list of frame records. The record
layout is inferred and listed in TechnicalDebt. Windows throws.
2026-10-17 14:56:56 +05:30
Dean 437f157d31 Merge pull request #6319 from hypermoist/docs/debt-duplicate-entries
docs(debt): drop the call tracing entry that --trace-imports superseded
2026-10-17 17:28:35 +13:00
Adrià d96e0e554c Merge pull request #5772 from DavidSamir/fix/libc-empty-guest-environment
fix(libc): start the guest environment empty instead of copying the host's
2026-10-16 21:23:35 +02:00
Alexej Szpevák b71434d9b7 feat(libc): read app0.zar beside app0 and refuse archive-only paths elsewhere
A ZArchive named app0.zar beside app0/ is a read-only layer under it. libc opens it at the first path resolution, looks paths missing from app0/ up case-insensitively, reads files across compressed blocks and keeps the archived descriptor table with shared positions.

Resolving an archive-only path through a call that does not read the archive throws instead of failing with ENOENT, as do opendir of a directory present in both places, fdopen of an archived descriptor and chdir into the archive. A path through .. in an archive-only directory resolves.
2026-10-16 20:03:26 +02:00
hypermistandClaude Opus 5.5 20edd079e4 fix(libc): store the sign of gamma in an exported signgam from lgamma
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:11:02 +13:00
Adrià 7663bc63bb Merge pull request #5092 from MrMha/fix/scripting-heap-694
feat(libc): provide the runtime scripting allocator hooks
2026-10-15 22:58:23 +02:00
Anthony 2b567cda34 fix(libc): count wide collate string elements 2026-10-15 15:30:40 -03:00
Yossi Yadgar a7ef31e103 docs(debt): note how closed standard descriptors are reopened 2026-10-15 18:19:21 +03:00
Adrià d67b79a7e4 Merge pull request #5709 from fogydes/fix/libc-formatting-allocation-and-bounds
fix(libc): check allocation result in vasprintf and guard null pointer in strndup
2026-10-15 17:04:33 +02:00