Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 66013d910b Merge pull request #4511 from rebelittle/fix/windows-seh-unwind
fix(libc): unwind guest exceptions through Windows DLL frames
2026-10-13 07:30:11 +13:00
Dean 4756c051ef Merge pull request #4504 from yunusshaikh7/fix/savedata-dir-name-trailing-wildcard
fix(savedata): let a trailing % in a directory name pattern match nothing
2026-10-13 07:29:49 +13:00
Dean acbaa8a16d Merge pull request #4495 from SibteProf/fix/relinker-sdk-mman-syscalls
fix(relinker): recognize SDK memory syscall trap patterns
2026-10-13 07:29:18 +13:00
Dean 4a49cda98f Merge pull request #4492 from ideabsassistenza/fix/pad-input-persistent-sequence
fix(pad-input): preserve command ordering across clock resets
2026-10-13 07:28:56 +13:00
Dean 2350fa5353 Merge pull request #4489 from Dripl1x/codex/guest-export-index
perf(relinker): index guest exports for dependency resolution
2026-10-13 07:28:34 +13:00
Dean e305bc4e4a Merge pull request #4483 from fable-void/pr/relinker-jump-table-targets
fix(relinker): treat jump table targets as branch targets when moving instructions
2026-10-13 07:28:12 +13:00
Dean 9907993e5f Merge pull request #4473 from arcwiser/fix/pr-overlap-fetch-batches
fix(tools): batch pr_overlap fetch refspecs
2026-10-13 07:27:51 +13:00
Dean 60f4c71608 Merge pull request #4466 from babyhuey/feat/libkernel-socid-cpumode
feat(libkernel): export sceKernelGetMainSocId, sceKernelGetCpumode and sceKernelGetCpuFrequency
2026-10-13 07:27:28 +13:00
Dean d4ccf91e03 Merge pull request #4462 from milescoviello/carry/libc-umodti3-4460
feat(libc): implement __umodti3
2026-10-13 07:27:06 +13:00
Dean b9f194a890 Merge pull request #4455 from SibteProf/fix/libc-secure-copy-size-limits
fix(libc): reject oversized secure copy destinations
2026-10-13 07:26:35 +13:00
Dean 91e263824e Merge pull request #4452 from orishamir/fix/relinker-null-symbol-imports
fix(relinker): resolve relocations against null symbol entries to 0
2026-10-13 07:26:13 +13:00
Yunus Shaikh 0a1dff2fcc perf(agc): read the draw snapshot cap when resources are built
ShaderResources::PrepareDrawBindings called MaxDrawSnapshotBytes() on
every draw, and it read APS5_DRAW_SNAPSHOT_MAX_MIB with getenv each
time. The UCRT's getenv takes the environment lock and scans the whole
block. In Planet of Lana (about 90,000 draws per 10 s) that call was
2.6% of the queue-0 worker's samples.

The cap is now read once when a ShaderResources object is built and
kept in it, so a cached resource template uses it for every draw it
serves. In Planet of Lana the record phase drops from 21.2 to 18.7 us
per draw.

drawSnapshotCapTests also raises the variable after building the
resources and checks that they keep the cap they were built with. With
the previous ShaderResources.cpp it fails there.
2026-10-12 11:26:09 -07:00
Dean 715bfabdac Merge pull request #4426 from babyhuey/feat/libc-overflow-error
feat(libc): export std::overflow_error type info, vtable and destructor
2026-10-13 07:25:42 +13:00
Dean 45e1b80636 Merge pull request #4421 from Lorkydey/fix/nid-names-invalid-cli-nids
fix(tools): reject invalid NIDs in the name lookup CLI
2026-10-13 07:25:21 +13:00
Yunus Shaikh da6948ea18 fix(libc): report host C++ exceptions that Windows cannot deliver
libstdc++ and libgcc raise C++ exceptions as SEH exceptions
(STATUS_GCC_THROW, 0x20474343), which the system dispatcher delivers by
unwinding frame by frame with each function's unwind data. The libraries
are built with -fno-asynchronous-unwind-tables and unwind with DWARF, so
their functions have no SEH unwind data. When a host runtime call such as
operator new throws straight into one of them, the dispatcher cannot
unwind it: no handler, the unhandled exception filter or std::terminate
runs, and the process ends without output and with exit code 0x20474343.

The vectored crash handler now follows a GCC exception through the
runtime frames that raise it (KERNELBASE, libgcc_s_seh-1, libstdc++-6).
When the first frame outside them has no unwind data, it reports the
exception's type, the thread and that frame, and lists the stack's
return address candidates, before the dispatcher continues.

The test loads libc.prx, then lets operator new throw std::bad_alloc
into a function built with the libraries' flags. Without the handler
change it exits silently with 0x20474343.
2026-10-12 11:25:20 -07:00
Dean 5d3e1740ff Merge pull request #4420 from Lorkydey/fix/check-skips-disabled-tests
fix(ci): reject disabled CTest cases in skip validation
2026-10-13 07:25:00 +13:00
Dean 30e169127d Merge pull request #4419 from Ondra97/codex/deferred-module-lifetime
fix(libkernel): bind deferred initialization to the loaded image
2026-10-13 07:24:39 +13:00
Dean 6f47d9117f Merge pull request #4416 from muhzain05/fix/videodec2-picture-owner
fix(videodec2): answer picture info from the decoder that last wrote the buffer
2026-10-13 07:24:18 +13:00
Dean 3ede42aace Merge pull request #4414 from AchrafReyani/fix/agc-single-sample-scan-into-msaa-target
fix(agc): rasterize a single-sample scan into a multisampled target at the pixel center
2026-10-13 07:23:57 +13:00
Dean 31ade9abc2 Merge pull request #4406 from Onny2/test/sce-net-absolute-invalid-name
test(net): look up the unresolvable name as an absolute name
2026-10-13 07:23:34 +13:00
Dean 83e6be8a69 Merge pull request #4394 from AaravMehta-07/codex/sce-net-stream-sender
fix(libSceNet): preserve successful stream recvfrom results
2026-10-13 07:23:13 +13:00
Dean 57f91221c4 Merge pull request #4380 from AzazelSensei/fix/libc-stream-errors
fix(libc): return stream errors from fwrite, fread and fputs instead of throwing
2026-10-13 07:22:52 +13:00
Dean b5546111b6 Merge pull request #4373 from milescoviello/fix/recvmsg-seqpacket-trunc
fix(libkernel): report MSG_TRUNC for SOCK_SEQPACKET records in recvmsg
2026-10-13 07:22:38 +13:00
Dean b701bc5d8d Merge pull request #4372 from milescoviello/fix/fflush-read-stream
fix(libc): leave a stream that is reading untouched in fflush on Linux
2026-10-13 07:22:17 +13:00
Dean 3377986a60 Merge pull request #4371 from milescoviello/fix/net-socket-timeval-timeouts
fix(libSceNet): read setsockopt timeouts as struct timeval
2026-10-13 07:21:55 +13:00
Dean edddd6a17b Merge pull request #4370 from milescoviello/fix/ipv6-only-sockets
fix(net): make new IPv6 sockets IPv6-only as FreeBSD does
2026-10-13 07:21:34 +13:00
Dean 59a2167a93 Merge pull request #4368 from SandstromPL/fix/conventions-run-from-subdirectory
fix(conventions): check the whole repository when run from a subdirectory
2026-10-13 07:21:13 +13:00
Dean f30e89ee7c Merge pull request #4365 from Gashrod1/fix/libc-strxfrm-truncation
fix(libc): truncate strxfrm like FreeBSD's C locale
2026-10-13 07:20:51 +13:00
Dean ee2c0f9b92 Merge pull request #4361 from Roojool/contrib/round2-c20
test(tools): support Python 3.10 in encoding regressions
2026-10-13 07:20:30 +13:00
Dean dfe9ccf6a2 Merge pull request #4360 from milescoviello/fix/wide-printf-grouping-flag
fix(libc): accept the ' flag in the wide printf family
2026-10-13 07:20:09 +13:00
Dean 15e64abd77 Merge pull request #4359 from milescoviello/fix/syslog-wide-format
fix(libc): format guest wide arguments in syslog on Linux
2026-10-13 07:19:47 +13:00
Dean 655cba83d5 Merge pull request #4358 from milescoviello/fix/scanf-binary-prefix
fix(libc): read %i without the C23 binary prefix in the scanf family on Linux
2026-10-13 07:19:26 +13:00
Dean 2c579b55f9 Merge pull request #4357 from milescoviello/fix/wide-printf-positional
fix(libc): format positional arguments in the wide printf family
2026-10-13 07:19:05 +13:00
Dean b538b28d8b Merge pull request #4354 from milescoviello/fix/fopen-append-position
fix(libc): start append-mode streams at the end of the file
2026-10-13 07:18:50 +13:00
Dean bde332a59c Merge pull request #4353 from milescoviello/fix/printf-errno-message
fix(libc): print the guest errno message for %m in the printf family
2026-10-13 07:18:29 +13:00
milescovielloandClaude Opus 5.5 eb9da23e68 fix(libkernel): accept socket option values longer than an int
setsockopt() on a guest socket failed with EINVAL unless the option
length was exactly sizeof(int), so an option passed as a 64-bit value
(for example SO_BROADCAST or SO_RCVBUF from an int64_t or size_t) was
rejected and silently left unchanged.

FreeBSD 11.4 reads these integer options through sooptcopyin() with the
size of an int as both the wanted and the minimum length, and only a
shorter value fails. sys/kern/uipc_socket.c, sooptcopyin():

	 * If the user gives us more than we wanted, we ignore it, but if we
	 * don't get the minimum length the caller wants, we return EINVAL.
	...
	if ((valsize = sopt->sopt_valsize) < minlen)
		return EINVAL;
	if (valsize > len)
		sopt->sopt_valsize = valsize = len;

and sosetopt() uses it for SO_BROADCAST, SO_REUSEADDR, SO_SNDBUF and
SO_RCVBUF:

	error = sooptcopyin(sopt, &optval, sizeof optval,
	    sizeof optval);

A longer value now sets the option from its first int; a shorter one
still fails with EINVAL.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 18:04:27 +00:00
Yunus Shaikh c55f377fb0 refactor(libc): place the NaN helpers and test includes apart from neighbouring changes 2026-10-12 11:03:36 -07:00
Aarav f11798413e fix(libkernel): guard SCE pthread semaphore count overflow
Reject invalid initial counts without replacing the semaphore and preserve a saturated count on post, matching the existing guest POSIX limits with encoded SCE errors. Add boundary and unchanged-value guest regressions.
2026-10-12 23:26:25 +05:30
Gustavo Ariel Gamarra Rojas 554e615524 test(agc): check that a buffer written over pending storage results keeps both
A storage image is written on the GPU and left pending, then a leased
address-based use writes the first 40800 bytes of the same memory as a
buffer and every pending image is flushed: guest memory must hold the
buffer's bytes where it wrote and the image's texels everywhere else.
Runs with watched and with compared imports and returns 77 when host
imports or write watching are unavailable.
2026-10-12 14:52:44 -03:00
Gustavo Ariel Gamarra Rojas f4ff589679 fix(agc): store pending storage results before a use writes the same memory as a buffer
Before a dispatch or draw that writes buffer ranges is recorded, store the
results of storage images still pending in those ranges, whatever path
serves the range (in place, copied, or an address-based heap, which the
per-region flush exempts), and include the written ranges in the pending
scan of a revalidated resource set.

Without it the image's write-back could come after the buffer write: a
partial write to a 64 KiB block made the write-back keep the whole block,
dropping the image's results in the rest of it, and a write-back recorded
after the buffer write stored the image's older texels over it. Titles
that reuse transient memory for textures and buffers in the same frame
(Unreal Engine's render graph transient allocator) read corrupted tile
data as a result.
2026-10-12 14:52:44 -03:00
lorkydey c052b7c720 feat(libc): query filesystem statistics by guest path 2026-10-12 19:42:52 +02:00
xXPBSXxandClaude Sonnet 5.5 a671dc4edf fix(avplayer): resume the presentation clock when the source restarts after a pause
Clock::Reset left the paused flag set by Clock::Pause, so a Start issued
from the paused state (stop and restart of the source) kept the clock
frozen at the start position. Only the frame at that position was
delivered; later frames were held back by the default A/V sync.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-12 19:36:06 +02:00
milescovielloandClaude Opus 5.5 11bda1c6a8 feat(libc): implement ceil
Kart PS5 (PPSA99611) stops on gacfOmO8hNs (ceil, per tools/nid_names.py)
from libc.prx once __umodti3 resolves (title run on #4519). ceil rounds
toward positive infinity whatever the rounding mode, keeps the sign of
zero and of results that round to zero, and returns infinities and NaNs
unchanged, as std::ceil does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 17:27:00 +00:00
MiniRML 63022e23cc Merge remote-tracking branch 'upstream/main' into fix/nid-windows-unicode-paths 2026-10-12 10:05:59 -07:00
MiniRML 69b6cb665f Merge remote-tracking branch 'upstream/main' into fix/kernel-json-number-locale 2026-10-12 10:05:55 -07:00
MiniRML a7799c4315 Merge remote-tracking branch 'upstream/main' into fix/nid-buffer-validation 2026-10-12 10:05:51 -07:00
QRMOE 79d88af192 test(libc): cover wide transform output bounds 2026-10-12 19:04:00 +02:00
QRMOE 22d03d497f fix(libc): terminate truncated wcsxfrm results 2026-10-12 19:03:18 +02:00
QRMOE 0950b19854 test(libc): cover exhausted tokenizer state 2026-10-12 19:01:27 +02:00
MiniRML ad43a486f0 test(nid): keep reference registration independent of other topics 2026-10-12 10:00:50 -07:00