Commit Graph
20967 Commits
Author SHA1 Message Date
al3w0f205 def6ca672c Merge remote-tracking branch 'origin/main' into test/appcontent-uninitialized-mount-and-infolist 2026-10-25 19:25:57 -05:00
al3w0f205 a8741dc79d Merge origin/main into test/ajm-wvorbis-null-header-packet 2026-10-25 19:23:27 -05:00
frankea 4db6ed7635 Merge remote-tracking branch 'origin/main' into fix/kernel-gettimezone-host-zone
# Conflicts:
#	core/libs/tests/GuestFreebsdClocks.cpp
2026-10-25 20:22:45 -04:00
frankea b5c6010f80 Merge remote-tracking branch 'origin/main' into fix/direct-memory-12gib 2026-10-25 20:21:28 -04:00
Adrià 97d33464c5 Merge pull request #9527 from AlxcBTW/pr/libc-annex-k-stream-io
feat(libc): add the Annex K stream printf, scanf and freopen_s functions
2026-10-26 01:21:26 +01:00
Himansh Raj 988eabf3dc fix(macos): publish the guest TLS key atomically
Aps5GuestTlsAllocateBlock and Aps5GuestTlsGetAddr read the descriptor's Key
outside the registration mutex while another thread's first access could be
writing it, a data race that could also expose a key before
pthread_key_create had finished. Every access now goes through
RegisteredKey: an acquire load through std::atomic_ref on the unchanged
descriptor field, and on a zero key a double-checked creation under the mutex
that publishes with a release store.

macos_guest_tls_first_access races the first access from 16 threads, 100
rounds through GetAddr and 100 through AllocateBlock, and checks for one
non-zero key, a distinct block per thread and a stable second access.
2026-10-26 05:48:54 +05:30
harisibrar1andClaude Opus 5.5 ce11ee1487 fix(libkernel): answer SO_ACCEPTFILTER on a datagram socket with EINVAL on Windows
Winsock does not answer SO_ACCEPTCONN on a datagram socket, so the
listening check returned the host error (ENOPROTOOPT). A datagram socket
can never listen, so it fails with EINVAL without asking the host, as
FreeBSD 11.4 does. Reported by @wachi35676.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 20:18:12 -04:00
edubox 45ea48c5aa fix(libc): free the future_error block when the message copy throws 2026-10-26 01:15:27 +01:00
Adrià 898a7fef4f Merge pull request #9631 from UnhealthyKraken/feat/libc-fetch-seqcst
feat(libc): implement sequential bitwise fetch helpers
2026-10-26 01:11:55 +01:00
Rookie a8c6b562d6 fix(libSceCesCs): map the strict JIS X 0208 profiles' unsettled cells as the console does 2026-10-26 00:10:31 +00:00
frankea a2fef12732 fix(agc): bracket sceAgcDcbDrawIndexIndirectMulti with the console's tag markers
On a PS5 (firmware 13.40) the builder writes SET_UCONFIG_REG 0x342 = 0xc6000005 before its DRAW_INDEX_INDIRECT_MULTI packet and 0xc6000000 after it, 64 bytes in all, and sceAgcDcbDrawIndexIndirectMultiGetSize returns 64.
2026-10-25 20:06:59 -04:00
orezraeyandClaude Opus 5.5 19566dbee8 fix(libkernel): set MSG_CTRUNC for an empty recvmsg control buffer as FreeBSD 11.4 does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:05:10 -03:00
Brainiac91 133ae3261f fix(relinker): only end the gap mask at a block that holds a syscall
A chain of table bytes that decodes to a return after a padding run looked
like trailing gap code and stopped the mask inside a real table, which hands
the rest of it back to the decoder. Truncating now needs the block to contain
a syscall, or to end where the gap turns into padding, so a 2 KiB table with
00/cc/90 runs and return-like bytes stays masked.
2026-10-26 02:02:49 +02:00
Danigamer05 94e88881d4 feat(libc): implement unsigned 64-bit minimum 2026-10-26 01:01:08 +01:00
qpavyros 9b2dd8dce9 merge: sync archive follow-up with main 2026-10-26 01:53:02 +02:00
xXPBSXxandClaude Sonnet 5.5 080c77547c Merge main (49d1f9b07e) into fix/gettimeofday-itimer-efault
The only conflict is in Time.cpp with the guest timezone store of the
settimeofday change: gettimeofday reads the timezone under the mutex into
a local copy, releases it, then copies it out with the checked write.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 00:52:14 +01:00
GruzzberryandClaude Sonnet 5.5 7322a3b9f8 fix(libkernel_sys): fchmodat follows a symbolic link like chmod
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 23:50:43 +00:00
Himansh Raj 5c134a8fee feat(macos): start relinked games
A relinked macOS game stops in dyld before any guest code runs: libc does not
export the guest entry and TLS functions the macOS relinker's executable
imports, and AppKit only allows windows on the process main thread.

- libc: add Aps5StartGuest, which the relinker's entry stub calls with the
  guest entry and the FreeBSD initial block. It runs the guest on a second
  thread and keeps the main thread serving the main dispatch queue.
- libc: add the guest TLS functions the relinked code imports
  (Aps5GuestTlsRegister, Aps5GuestTlsAllocateBlock, Aps5GuestTlsGetAddr,
  Aps5GuestTlsUseXsave).
- libc: MainThread.hpp's RunOnMainThread runs a call on the main thread,
  waits for it and rethrows its exception. It runs on the calling thread
  when the main thread does not serve the main queue, as in the tests.
- libSceVideoOut: create, resize, retitle and destroy the window, initialise
  SDL video, create the Vulkan surface and pump events through
  RunOnMainThread on macOS.
- libc: find the process parameters through dl_iterate_phdr on macOS too,
  and link CoreFoundation.
- relinker: leave 0x400 bytes after the Mach-O load commands, like ld's
  -headerpad, so codesign's LC_CODE_SIGNATURE no longer overwrites the
  entry stub.

Linux and Windows compile the same libc and libSceVideoOut code as before.
2026-10-26 05:19:42 +05:30
Kraken 54dadc019e fix(freetype): retain newly identified Ot inventory aliases 2026-10-25 23:43:52 +00:00
Kraken a36fd27f64 fix(freetype): reconcile provider NIDs and public declarations 2026-10-25 23:43:17 +00:00
Kraken f6190694de Merge remote-tracking branch 'origin/main' into HEAD 2026-10-25 23:41:43 +00:00
Kraken 8df45c965d Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	core/libs/tests/GuestLibcThreads.cpp
2026-10-25 23:41:36 +00:00
Kraken 14b096d3d6 test(libc): stop pinning unsupported prefix inputs 2026-10-25 23:40:10 +00:00
orezraeyandClaude Opus 5.5 d06b45fba5 test(libkernel): repeat scePthreadCondSignalto from a mutex-holding thread on normal and recursive mutexes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 20:38:09 -03:00
harisibrar1andClaude Opus 5.5 db79e3cd02 feat(libSceRudp): implement sceRudpPollCancel as firmware 13.42's library does
A cancel with no waiter is kept once for that poll and makes its next
sceRudpPollWait return 0x80770014, also with a zero timeout. A cancel
with waiters wakes all of them with 0x80770014 and returns once none is
left. Behaviour from @BunnyFl's execution of the 13.42 libSceRudp.sprx
in #10954.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 19:37:51 -04:00
Kraken 90496dd15b Merge remote-tracking branch 'origin/main' into HEAD 2026-10-25 23:37:41 +00:00
thibautandClaude Opus 5.5 03bc1d1aa6 build(deps): restore SPIRV-Tools v2025.5 and its SPIRV-Headers revision
#6134 moved both submodules back to v2025.4 and 01e057791 by accident, which
undid #5319.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PHJtpJ4hw3KWJhobipK8ia
2026-10-26 00:37:22 +01:00
Adrià acb900c194 Merge pull request #9737 from imellag/feat/agc-depth-bounds-emulation
feat(agc): emulate a one-sided depth bounds test without the depthBounds feature
2026-10-26 00:35:49 +01:00
harisibrar1 7784604b0b Merge remote-tracking branch 'origin/main' into fix/pselect-pending-signal-eintr
# Conflicts:
#	core/libs/prx/libkernel/System/src/Signals.cpp
2026-10-25 19:35:03 -04:00
qpavyros bebe28593d fix(libkernel): preserve native directory metadata 2026-10-26 01:33:46 +02:00
harisibrar1andClaude Opus 5.5 d2bb979ffc fix(libSceLibreSsl): convert ASN1_STRING_to_UTF8 in two passes
Validate the string and count its UTF-8 size first, then make the one
guest allocation and write into it, so no std::vector can throw
std::bad_alloc past the guest. Approach from @thepoppfish's review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 19:33:36 -04:00
Dean Galvin f4d5420b4b Merge branch 'main' into feat/libc-lcosh 2026-10-26 12:28:05 +13:00
Adrià 47f9cee2cd Merge pull request #9579 from slopgobblercobbler/fix/savedata-delete-search-mount3-param-error
fix(savedata): validate null arguments in delete, search, and mount3
2026-10-26 00:27:15 +01:00
plexerPK bb45d3315d fix(relinker): ignore segment overrides on fixed-ES string instructions 2026-10-26 00:26:01 +01:00
Alexandre Figueiredo 40619ba1cc fix(libc): return Dinkumware codes from __fpclassifyf 2026-10-25 23:25:35 +00:00
Brainiac91 3cb3e8f53b fix(relinker): end the data table mask at a control-flow terminator
A gap that holds a table, padding and then a syscall stub followed by
non-padding data classified the stub as invalid, so the mask ran to the end
of the gap and hid the syscall from the scan. Mark any instruction that ends
control flow as a terminator, which stops the mask before that block.

Covered by the helper test and by the SCE, SysV and guest-module conversion
tests, which convert before the change and refuse syscall 9 after it.
2026-10-26 01:23:47 +02:00
Brainiac91 ac1dc93255 perf(relinker): binary-search function ranges for gap branch targets
Every pending gap target walked the whole unwind function vector, so a
large executable cost targets x functions. Sort and merge the ranges once,
then use upper_bound for each target.
2026-10-26 01:23:39 +02:00
Yunus Shaikh bf0f293edd Merge main into feat/scenet-config-and-ether-calls 2026-10-25 16:23:19 -07:00
Muhammad Wasif Ali WasifandClaude Opus 5.5 fff18d2f3b test(libSceSystemService): accept the write watch diagnostic before the LoadExec child's line
guest_system_load_exec_standard_error compared the host standard error of
the re-executed child with "started <mode>\n" exactly. On a Linux kernel
without asynchronous userfaultfd write protection (before 6.7, such as
WSL2's 6.6) libc prints "[memory] write watch unavailable: ..." to the
host standard error at start-up, so the comparison failed and the test
aborted on every run. That one diagnostic line is now skipped when it
comes first; the rest of the host stream must still be the child's line
exactly, and the guest pipe must still be empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01En5cnt6RwCiNXDJwm9t8Tf
2026-10-26 04:22:43 +05:00
orezraeyandClaude Opus 5.5 f853f07ae3 docs(libkernel): limit the measured accept inheritance of the SO_ bits to the options the probe set
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 20:16:25 -03:00
Adrià 2b5225605b Merge pull request #9719 from AasishDairelSahayaGrinspan/fix/relinker-gs-non-memory-operands
fix(relinker): leave GS-prefixed LEA and NOP instructions unchanged
2026-10-26 00:15:58 +01:00
Adrià 710cf9c035 Merge pull request #9668 from rooklz/fix/libc-acosf-msun
fix(libc): compute acosf with FreeBSD msun's algorithm, as the console's libc.prx does
2026-10-26 00:14:55 +01:00
Adrià efd368fec6 Merge pull request #9469 from Gruzzberry/fix/chflags-dangling-link
fix(libkernel): fail chflags through a dangling Windows symbolic link with ENOENT
2026-10-26 00:13:50 +01:00
Dean 1997e647f9 Merge pull request #10017 from SteelCrab/review-split/relinker-import-types
fix(relinker): preserve imported ELF symbol types
2026-10-26 12:11:16 +13:00
Dean 2a16d79fb9 Merge pull request #10722 from rooklz/fix/cescs-error-length
fix(libSceCesCs): report the length of a rejected MBCS character as the console does
2026-10-26 12:10:41 +13:00
qpavyros 6105be4431 merge: sync archive directories with main 2026-10-26 01:10:12 +02:00
Dean 346a1be323 Merge pull request #10127 from Felipebmaitan/feat/ngs2-pcm-playback
feat(ngs2): play additional PCM sampler formats
2026-10-26 12:10:04 +13:00
Dean 380ffe3a3a Merge pull request #10456 from alnsx/codex/fix-select-redirected-input
fix(libkernel): poll files on standard descriptors as vnodes
2026-10-26 12:09:32 +13:00
Adrià b76f08cf33 Merge pull request #9727 from KernelPanicNT/fix/net-reject-unsupported-flags
fix(libSceNet): reject the flags and names the module rejects
2026-10-26 00:07:35 +01:00
JJenkx 2def057898 test(libc): align wide stream expectation with console rounding 2026-10-25 19:06:20 -04:00