AnyPS5/core/libs/prx/libkernel
Cesar Rodriguez 7637cac13e fix(libkernel): place guest thread stacks inside the application area
On Linux, glibc maps the stack of every guest thread near the top of the
host address space (around 0x7fff00000000). On the console, application
stacks lie inside the application area below 0xFC00000000, and guest code
relies on that: ChakraCore's garbage collector indexes a 4 MiB table with
address >> 18, so it only covers addresses below 1 TiB and reports
Js::OutOfMemoryException for a stack above it.

Map each guest thread's stack with DoMapAnon, which allocates from the
guest arena, behind a PROT_NONE guard page, and pass it to pthread_attr_setstack.
The stack is freed after a join; the stack of a detached thread is freed once its
host thread is gone from /proc/self/task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:03:36 +02:00
..
Aio/src fix(aio): use precise polling sleep 2026-10-11 18:48:18 -04:00
AppMetadata Merge pull request #4558 from MiniRML/fix/kernel-json-number-locale 2026-10-13 15:37:49 +13:00
Apr fix(ampr): reserve remap targets before releasing pool pages 2026-10-13 07:50:53 +00:00
DirectMemory Merge pull request #4386 from MarcZX100/codex/carry-mlockall-getdtablesize-3628 2026-10-14 00:37:29 +13:00
Equeue fix(libkernel): route equeue socket checks by membership 2026-10-13 03:28:27 +00:00
EventFlag/src feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
File Merge pull request #4532 from DavidSamir/fix/libc-rename-replace-open-destination-windows 2026-10-14 00:38:14 +13:00
Module Merge pull request #4688 from eliyarson/fix/kernel-stat-relinked-prx 2026-10-13 17:48:42 +13:00
Pthread fix(libkernel): place guest thread stacks inside the application area 2026-10-13 16:03:36 +02:00
Semaphore fix(libkernel): report the remaining time from sceKernelWaitSema 2026-10-11 20:09:33 +00:00
Socket fix(libkernel): accept POLLPRI on guest sockets under WSAPoll 2026-10-13 11:15:48 +02:00
SyncOnAddress/src feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE 2026-10-11 17:48:06 +00:00
System fix(libkernel): keep the execv export and its debt line 2026-10-13 15:19:19 +02:00
Time Merge pull request #4466 from babyhuey/feat/libkernel-socid-cpumode 2026-10-13 07:27:28 +13:00
CMakeLists.txt Merge pull request #4086 from hugodearaujo/fix/setschedparam-console 2026-10-13 14:29:15 +02:00
KernelErrors.hpp refactor(kernel): share SCE kernel error codes through KernelErrors.hpp 2026-09-27 13:32:28 +07:00
Unimplemented.cpp feat(libkernel): implement the coredump user-data calls 2026-10-13 04:43:50 +00:00