Commit Graph
12196 Commits
Author SHA1 Message Date
javierUDP cc69253830 fix(relinker): keep the interpreter path out of the scanned code
The code analysis trims an interpreter path from the start of an
executable segment only for images that have a PT_SCE_DYNLIBDATA block.
An executable without one keeps that path in the scanned range, so
/libexec/ld-elf.so.1 is walked as code: a RELATIVE relocation with
addend 0 roots the control flow graph at the first byte of the segment,
and the 0x64 of "ld-elf" decodes as an FS-prefixed instruction that the
Windows and macOS TLS rewriters refuse. The trim now runs for both
layouts, ending at the segment for an image without the block.
2026-10-20 14:56:20 -03:00
Ondra97 c7032e6acf fix(libSceNet): retire invalidated epoll registrations 2026-10-20 19:42:54 +02:00
MarcZX10 2e4e1a5113 test(libkernel): cover socket descriptor exhaustion 2026-10-20 17:41:40 +00:00
MarcZX10 2299284a69 fix(libkernel): keep socket descriptors within FD_SETSIZE 2026-10-20 17:41:40 +00: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
xXPBSXxandClaude Sonnet 5.5 eaadb2924b fix(libkernel): report the starting entry index in getdirentries basep on Windows
The Windows sceKernelGetdirentries stored 0 in *basep on every read, so a
guest looping on the cookie saw it stall (FreeBSD stores the directory
offset the read started at, kern_getdirentries: *basep = loff). Report the
index of the first entry of the read, the same unit lseek takes on these
descriptors, and run guest_directory_entries on Windows, where it was never
built.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 19:33:03 +02:00
Ethan Barr 084dcf8736 fix(libkernel): fire EVFILT_WRITE on a socket once free send space reaches NOTE_LOWAT
kevent threw NotImplemented for EVFILT_WRITE with NOTE_LOWAT above 1 on a socket, although the socket readiness check already reports free send-buffer space (SO_SNDBUF less SIOCOUTQ on Linux). The write event now fires once that space reaches the mark, as FreeBSD 11's filt_sowrite compares sbspace with kn_sdata, and stays silent while the space is below it. The debt entry no longer says a write mark is limited to 1. Reference: https://github.com/freebsd/freebsd-src/blob/release/11.0.0/sys/kern/uipc_socket.c
2026-10-20 13:32:17 -04:00
Dean 892a4f1328 Merge pull request #7993 from MarrasFederico/fix/relinker-windows-trampoline-builder-guards
fix(relinker): validate Windows trampoline section placement and sites
2026-10-21 06:30:55 +13:00
Dean b9731811ba Merge pull request #8001 from mopga/fix/relinker-amd-only-claimed-followers
fix(relinker): do not take instructions another AMD-only stub moved as a short instruction's followers
2026-10-21 06:30:39 +13:00
Nicolas Abosch f857616caa Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp
#	core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
2026-10-20 14:29:10 -03: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
Braxton Atkinson 750299a617 test(libSceNpUniversalDataSystem): cover locale-independent describe output 2026-10-20 12:27:13 -05:00
Braxton Atkinson 941ca91d18 fix(libSceNpUniversalDataSystem): keep float text locale-independent 2026-10-20 12:27:12 -05:00
Dean 083a3be61c Merge pull request #8058 from HQasper/claude/project-thread-md0z38
feat(libSceFont): open the other script files of a system font set
2026-10-21 06:26:24 +13: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 3e7d1d297c Merge pull request #8138 from bl4nkTHEBUNKER/fix/pad-touchpad-resolution
fix(libScePad): report the DualSense touchpad resolution
2026-10-21 06:25:52 +13:00
Dean bdc33a556c Merge pull request #7995 from mpratsaki/fix/relinker-windows-file-identity
fix(relinker): compare Windows file identities by handle
2026-10-21 06:25:35 +13:00
xXPBSXxandClaude Sonnet 5.5 3fb021f9bb fix(libSceNet): map every host socket error through the guest errno table
sceNet translated only 21 host socket errors and reported every other one
as EIO. libkernel already owns the complete FreeBSD table in
GuestSockets::GuestErrorFromHost, so use it for net_error. The new check
makes a stream socket with the UDP protocol fail with EPROTONOSUPPORT (43)
instead of EIO (5).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 19:24:33 +02:00
Yuri Olive 43e7a4792e Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/gamelivestreaming-missing-exports
# Conflicts:
#	core/libs/prx/libSceGameLiveStreaming/Export.cpp
2026-10-20 14:23:27 -03: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
mantavisualandClaude Opus 5.5 73784e2050 fix(libkernel): leave a file's times untouched when Windows utimes refuses them
On Windows, utimes, lutimes, sceKernelUtimes and futimes open a
FILE_WRITE_ATTRIBUTES handle and only then encode the times. A time the
host cannot represent returned EINVAL without calling SetFileTime, and
with NTFS last-access updates enabled closing that handle set the file's
access time to the current time, so a rejected call still changed the
file and guest_file_timestamps failed on "access time preserves
microseconds". A rejected time now marks the handle with 0xFFFFFFFF,
which SetFileTime documents as preventing operations on the handle from
updating the times, before the handle is closed. Error order is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 20:20:20 +03:00
Dean 989b6ea794 Merge pull request #7999 from mopga/fix/relinker-amd-only-sequence-in-place
fix(relinker): move in-place AMD-only replacements into a short instruction's stub
2026-10-21 06:19:51 +13:00
Dean ae12a951f5 Merge pull request #8114 from savvaniss/feat/declare-ps4-hasbro-imports
feat(libs): declare sceGameLiveStreamingEnableLiveStreaming and sceKernelPrintBacktraceWithModuleInfo
2026-10-21 06:19:07 +13:00
Dean 407d0d8df3 Merge pull request #8100 from LuisAguilarDev/feat/netctl-get-info-v6
feat(netctl): add sceNetCtlGetInfoV6 argument and connection checks
2026-10-21 06:18:12 +13:00
Emanuele 1b81383137 perf(agc): probe the f32 denormal flush on MoltenVK
The startup probe that lets shaders use the device's f32 denormal flush
instead of the emulated one only ran on devices that declare
shaderDenormFlushToZeroFloat32 with independent denormal behavior.
MoltenVK declares neither flushing nor preserving f32 denormals, so every
shader kept the emulated flush on every f32 add, multiply, fma, min, max
and comparison.

On MoltenVK the probe now runs too. Since the device declares no
DenormFlushToZero capability there, a module compiled for the hardware
flush declares no DenormFlushToZero execution mode and relies on the
native behavior the probe measured; when any probe result differs from
the emulated flush, shaders keep the emulation as before. Devices that
declare the capability are unchanged.
2026-10-20 19:16:39 +02:00
Kovalev Vladislav 2190ccd20c fix(shader): discover prebuilt caches through native Windows paths 2026-10-20 23:11:57 +06:00
Kovalev Vladislav b97b122f65 test(shader): isolate prebuilt cache directory discovery 2026-10-20 23:11:57 +06: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
Dean 2fee39f1b3 Merge pull request #6684 from SandstromPL/fix/relinker-guest-zero-init
fix(relinker): run a guest DT_INIT of 0 as the module initializer
2026-10-21 06:07:25 +13:00
Ondra97 07486d7cfa fix(libkernel): report current thread scheduling policy in attributes 2026-10-20 19:05:08 +02:00
Dean 83751168dd Merge pull request #8202 from babyhuey/feat/libkernel-open-event-flag
feat(libkernel): implement sceKernelOpenEventFlag
2026-10-21 05:59:15 +13:00
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
xXPBSXxandClaude Sonnet 5.5 8977922244 fix(libkernel): drop undefined protection bits in mprotect
FreeBSD 11.4 kern_mprotect masks the argument with VM_PROT_ALL instead of
refusing it (sys/vm/vm_mmap.c:613). sceKernelMprotect already does this
since #5770; the POSIX mprotect export still failed with EINVAL.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 18:51:41 +02:00
Dean 1b08a33b12 Merge pull request #8548 from tkcm01/fix/windows-icon-utf8-path
fix(relinker): format invalid Windows icon paths as UTF-8
2026-10-21 05:47:06 +13:00
Emanuele f0fd092678 perf(agc): find a draw's highest index with a loop the compiler vectorizes
HighestDrawIndex read each index through a branch on the index size and
kept the maximum in a std::optional, so neither clang nor GCC vectorized
it, and an indexed draw scans its whole index range when its range is not
kept (fewer than Recorder::KeptIndexRangeIndices indices, or a range
whose memory is not tracked). The scan now runs one loop per index type:
the maximum without restart, or with restart the maximum of the indices
masked by whether they are the restart index, plus an OR of those masks
for whether any index was not a restart index. Results are unchanged.
2026-10-20 18:46:18 +02:00
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
thuanquangandClaude Opus 5.5 d896645ec7 fix(relinker): name the guest module in its output filename errors
The checks on a guest module's output name threw without an input
path, so the conversion's catch reported the main executable. They now
carry the module's path, as the guest image reader's errors do. The
loop's duplicate-export check gets the same change for consistency; it
cannot fire, because the reader rejects a duplicate first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 23:45:00 +07:00
Dean d0852defa2 Merge pull request #6982 from XairRrR/perf/agc-drop-tracked-texture-snapshot
perf(agc): drop the guest byte snapshot of a large cached texture the write tracker covers
2026-10-21 05:38:58 +13:00
Dean baae66415c Merge pull request #5799 from SleglJan/fix/cube-output-modifiers
fix(shader): apply cube output modifiers whenever IEEE mode is off
2026-10-21 05:38:37 +13:00
aarushkhaandClaude Opus 5.5 261fe36987 fix(agc): check a pipeline cache file's existence through the long-path form
When the full read fails, readFile asked std::filesystem::exists with the
plain path, so on Windows a cache file past MAX_PATH was reported missing
instead of unreadable and could be saved over.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 22:00:08 +05:30
dantdmdarealguy a7e6e597d3 fix(libc): switch update streams to reading as FreeBSD does
On Windows the UCRT does not switch an r+, w+ or a+ stream from writing
to reading without fflush or fseek: fread after fwrite returned bytes of
the write buffer and the next flush wrote them over the file, and ungetc
failed on an update stream that was not already reading. On Linux glibc
does not switch either for ungetc, which pushes the byte back over the
pending write, drops the write and can corrupt the heap on the next read,
or for an fread of at least the buffer size, which drops the write and
reads from the old offset.

fread, fgetc, getc_unlocked, fgets, ungetc, ungetwc and fscanf now flush
pending output and mark the stream as reading first, as FreeBSD 11.4's
__srefill and __ungetc do, through _IO_switch_to_get_mode on glibc.
Writes directly after reads still go through the UCRT on Windows; the
gap is recorded in the libc technical debt.
2026-10-20 11:28:19 -05:00
aasishdairel 0d3f6f7262 test(relinker): split GS trap coverage groups
The Windows gs_traps group grew to 21 relinker invocations and ran close to its 30 s CTest timeout on a loaded host. Split the implicit-memory cases into gs_traps_implicit so each group stays well under the limit, and share the per-case check between them.
2026-10-20 21:54:30 +05:30
Adrià f6ce8e34a2 Merge pull request #7666 from tibzejoker/fix/normalized-storage-write-rounding
fix(shader): round normalized storage image writes from the exact product
2026-10-20 18:24:01 +02:00
aarushkhaandClaude Opus 5.5 21ff939156 fix(agc): read the pipeline cache header through the long-path form on Windows
PipelineCache::readHeader opened the cache file with a plain path while
readFile and the writer already use NativeCachePath_nid_no_patch. Past
MAX_PATH the header read failed, so every save saw the file as changed
and merged it again (#7452).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 21:53:16 +05:30
teepeanandClaude Opus 5.5 eef987ae7b perf(agc): fold the occlusion dumps of a queued store run once
A queued store run records each group's plain stores and then its
occlusion counter dumps, and any store after a dump starts a new group,
so a label the title writes after its dumps lands after them. A title
that clears each query slot, dumps into it and then writes a flag after
it gets a group per slot that way: a barrier, then three fold dispatches
with a barrier before each.

The run's writes are now recorded in three parts where that keeps the
final bytes: the stores before the first dump and the stores that a
later dump overlaps (the clears of the slots), then every dump in one
fold, then the other stores in their order. A store after a dump that
no later dump overlaps still lands after every dump before it, and those
stores keep their order. A clear that only a later dump covers in part
must not overlap an earlier dump, and no clear may overlap a store it
moves ahead of; otherwise the run keeps its groups.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-20 19:21:50 +03:00
Dean 6bef96df7c Merge pull request #8168 from savvaniss/fix/relinker-trailing-table-before-code
fix(relinker): accept a relative jump table padded to 16 bytes before more code
2026-10-21 05:17:27 +13:00
Dean ab07854a58 Merge pull request #8166 from savvaniss/fix/sce-gap-syscall-data
fix(relinker): treat data between PS4 unwind functions as data in the syscall scan and the code roots
2026-10-21 05:17:04 +13:00
Adrià 10e2cbf648 Merge pull request #7541 from ionut27001/fix/libkernel-sysctl-absent-names
fix(libkernel): return ENOENT for thirteen sysctl names, as measured on a PS5
2026-10-20 18:13:19 +02:00
LeandroLP23andClaude Opus 5.5 28ce7bc0b8 fix(agc): create every shader module through the pipeline-library cache key
Six vkCreateShaderModule calls added to main since this branch's base
still passed their SPIR-V unchanged, so on AMD's Windows driver they
shared on-disk cache entries across the two pipeline library modes:
splitComputePipeline's recompiled compute programs, the multisample
readback modules, the dispatch-arguments module, the texture repack
module and the two performance overlay modules.

Graphics::CreateShaderModule now keys the generator word and creates the
module in one place. Every module the driver creates goes through it,
including the recompiled graphics and compute programs that copied the
key inline, so new call sites can't skip it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:12:06 +02:00
tkcm01 4d07bc0231 fix(relinker): format invalid Windows icon paths as UTF-8 2026-10-20 12:10:00 -04:00