Commit Graph
1302 Commits
Author SHA1 Message Date
Adrià e5ca7307cf Merge pull request #6292 from meh7an/perf/agc-draw-path-locks
perf(agc): replace winpthreads locks and TLS on the draw path
2026-10-23 11:53:59 +02:00
Mehran 2659ec333e perf(agc): replace winpthreads locks and TLS on the draw path 2026-10-23 11:32:03 +03:00
alfalfa-starandClaude Opus 5.5 5d3c0d741a perf(agc): memoize host import run bounds per lease snapshot
Every import lookup walked the lease out from the containing range to find
the run of continuing registry ranges, which is linear in the run length.
That walk depends only on the lease snapshot, the containing range and the
import window block, so its first and last index are now memoized per
thread under a weak reference to the snapshot, the range index, the window
and the window's low end. APS5_NO_RUN_MEMO walks every time.

Everything that depends on other state runs on each call as before: the
largest size, the budget, the failed blocks, the remembered refusals and
the halving block search. importRunBounds returns the chosen indices, so
sameRange, runCovers and the whole-run lookup in importAllocation compare
against the lease without copying the run's range pointers.

importRunFailureShrinkTests records a failed 8 MiB block between two
lookups on an unchanged registry and requires the run to shrink to its
4 MiB blocks. importRunGrowthTests and importRunReplacedTests check that a
run grows and shrinks when its ranges are registered or replaced.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 10:04:37 +02:00
hypermistandClaude Opus 5.5 4d1e7d8b60 fix(libc): set EILSEQ in btowc for bytes that cannot start a character
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 13:32:50 +13: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
Adrià a6fc8a467d Merge pull request #8797 from xXPBSXx/fix/unlink-rmdir-dot-component
fix(libkernel): fail unlink and rmdir of a path that ends in a dot component with EINVAL
2026-10-22 20:40:44 +02: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à d969e4bd60 Merge pull request #9223 from xXPBSXx/fix/file-stream-status-sync-race
fix(libc): publish the guest FILE status of a stream with atomic accesses
2026-10-22 20:24:20 +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 4a67c165b6 fix(libc): match reported wide scanf edge cases 2026-10-22 20:11:31 +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
Adrià 11f976b27c Merge pull request #8509 from xXPBSXx/fix/stdio-transfer-overflow
fix(libc): fail fread with EINVAL when size times count overflows
2026-10-22 18:48:00 +02:00
Dean 9c3b1af626 Merge pull request #7952 from emirplus/fix/libc-wcscpy-s-limits
fix(libc): check size limits and null terminate on wcscpy_s constraint violations
2026-10-23 05:47:22 +13:00
emirplus 2824bf21eb fix(libc): check size limits, overlap, and invoke handler in wcscpy_s 2026-10-22 18:33:56 +03:00
emirplus a998987278 fix(libc): compare destination object range with source in strncpy_s and strncat_s 2026-10-22 18:31:04 +03:00
emirplus 4561711b75 fix(libc): check overlap in strncpy_s and strncat_s 2026-10-22 18:29:37 +03: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
Dean 6ef5a1c4c9 Merge pull request #8974 from rooklz/fix/call-trace-fixed-base
fix(libc): count call trace offsets from the first page of a non-PIE executable
2026-10-22 15:24:57 +13:00
hypermistandClaude Opus 5.5 d06dfb1caf fix(libc): stage wctomb_s and wcrtomb_s through _Getmbcurmax and pin their UTF-8 results
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 14:41:50 +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 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
Superhe11 eecffc924b test(libc): cover snprintf size bounds and formatting side effects 2026-10-21 20:34:41 +03:00
xXPBSXxandClaude Sonnet 5.5 acf96f32d0 fix(libc): fail snprintf and vsnprintf with EOVERFLOW when the size exceeds INT_MAX
FreeBSD 11.4 vsnprintf checks the size minus the terminator against INT_MAX
before formatting and, when it is larger, sets errno to EOVERFLOW, writes a
terminator to the buffer and returns EOF (lib/libc/stdio/vsnprintf.c:61-67).
The guest formatted into the buffer and returned the length.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 20:34:41 +03:00
xXPBSXxandClaude Sonnet 5.5 f65a3f3341 fix(libc): publish the guest FILE status of a stream with atomic accesses
Two threads writing to the same stream each ran FileStream::SyncStatus
after their stdio call, outside the FILE lock, with plain writes to the
read and write counters and a read-modify-write of the flag word, so the
flags of one thread could be lost. Publish the counters with atomic
stores and the flags with a compare-exchange loop; the values stay the
same.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 17:29:16 +02:00
Dean 1d2f8cfe0e Merge pull request #8859 from hypermoist/feat/libc-c11-thread-forwards
feat(libc): forward the C11 thread and TSS calls to libkernel
2026-10-22 01:54:23 +13: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
Adrià 0a5080477f Merge pull request #6655 from al3w0f205/perf/hybrid-cpu-topology-worker-pinning
feat(libc): support multi-tier hybrid cpu topology in LayoutFromClasses
2026-10-21 13:01:57 +02:00
Dean a1f95a523f Merge pull request #8849 from hypermoist/fix/libc-integer-base
fix(libc): follow the console for integer bases and 0x prefixes
2026-10-21 23:46:18 +13:00
Dean e6ebe8a8b7 Merge pull request #8857 from Dripl1x/perf/direct-memory-section-pool
perf(libkernel): reuse released direct-memory sections that never held data
2026-10-21 22:20:39 +13:00
Rookie 0a2ba6ed9a fix(libc): count call trace offsets from the first page of a non-PIE executable 2026-10-21 09:00:05 +01: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 ee613abc2a Merge pull request #8324 from hypermoist/feat/libc-timezone-daylight
feat(libc): export timezone and daylight
2026-10-21 20:57:08 +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
blu e8196fcb4a Merge branch 'boykopovar:main' into feat/libc-num-get-objects 2026-10-20 23:36:19 -07:00
xXPBSXxandClaude Sonnet 5.5 9e6a3f9127 style(libc): drop the comment above TrimTrailingSeparators
Comments are only allowed for technical debt in this repository.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 08:18:49 +02:00
xXPBSXxandClaude Sonnet 5.5 7d87767137 fix(libc): keep the root when trimming the parent of a dot component
Trimming every trailing separator turned the Windows drive root "C:\" into
the drive-relative "C:". Trim only while the parent is longer than its
root_path(), and cover "/", "C:\" and "C:/" in guest_filesystem.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 08:16:59 +02:00
xXPBSXxandClaude Sonnet 5.5 288bd35d0d fix(libc): resolve the parent of a dot component without its trailing separator
RenameDotError_nid_no_patch resolved the parent with the separator kept
("file/"). On Linux std::filesystem::exists("file/") is false for a regular
file, so unlink, rmdir and rename of "file/." answered ENOENT instead of
ENOTDIR. Trim the trailing separators first (a lone "/" stays) and cover
rename of "file/." and "file/.." in guest_filesystem.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-21 08:01:50 +02:00
Dean eb9f904d32 Merge pull request #8801 from xXPBSXx/fix/dot-component-through-file
fix(libc): fail a path that ends in a dot component below a regular file with ENOTDIR on Windows
2026-10-21 18:36:28 +13:00
Dean 1ff5c8ac5c Merge pull request #8217 from xXPBSXx/fix/rename-dot-component-fb
fix(libc): report a status error of the rename parent directory instead of ENOENT or ENOTDIR
2026-10-21 18:00:40 +13:00