Commit Graph
3 Commits
Author SHA1 Message Date
XairRrR 9206b5ae4b fix(libSceFiber): run a fiber on its own context when the context is large
Since 794714983 every fiber ran on an mmap'd host stack so that host calls
cannot overrun the small contexts PPSA01341 packs next to each other. A
title that derives state from the stack pointer then reads the wrong
memory: PPSA05684's job fibers have 512 KiB contexts at 1 MiB-aligned
addresses and find their job record by masking rsp with ~0xfffff, so the
job system lost track of a GameInit job and the game waited forever
right after loading big4r/actor76.txt. Its 64 KiB fibers fault later on
a host stack too.

A fiber now gets a host stack only when its context is smaller than
64 KiB; a larger context is the stack again, as on the console. The
limit sits between the 16 KiB contexts that need protection and the
64 KiB ones that need the guest stack (technical debt entry). The fiber
test runs a 512 KiB fiber and checks that its stack is in its context;
it fails without this change.

AI-assisted: yes
2026-10-14 20:47:25 +02:00
MathiasDevelopes bcd4c4ed72 fix(fiber): report the stack used by the executing fiber
(cherry picked from commit 807642a29ee88b05ddb38b5925f20c5abe27a5f6)
2026-10-13 19:31:32 +02:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 20:38:29 +02:00