Files
AnyPS5/docs/dev/debt/changes/fix-nkwebkit-js-stack-overflow-range-error.md
ToRaNekandClaude Fable 5.2 0086a7af28 fix(libSceNKWebKit): raise a RangeError when script recursion runs out of stack
The QuickJS runtime behind the JS API was created with its stack check
switched off, so a script that recursed without end ran off the native
stack and killed the process. JavaScriptCore throws a RangeError.

The limit is now computed at each outermost entry into script, as
VM::updateStackLimits and StackBounds::recursionLimit do: from the stack
pointer at the entry, at most Options::maxPerThreadStackUsage (5 MiB),
keeping Options::softReservedZoneSize (128 KiB) above the end of the
stack of the current thread.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 05:46:55 +01:00

910 B

libSceNKWebKit

add Functional

  • JS stack limit (libSceNKWebKit) - not checked on a console. Script that runs out of stack raises a RangeError. The limit is set at each outermost entry into script as VM::updateStackLimits and StackBounds::recursionLimit do, with the default 5 MiB of use and 128 KiB reserved zone. A QuickJS frame is not the size of a JavaScriptCore frame, so the depth reached differs, and the message is the one of QuickJS. A thread whose stack the guest pthread layer cannot describe gets no limit. Closes when: compared with a console.