ladybird/Tests/LibJS
sideshowbarker d7c08964cb LibJS: Throw rather than crashing on a deep prototype-chain get
Problem: Converting an object with a pathologically-deep prototype chain
to a primitive was segfaulting.

Cause: Object::internal_get implements [[Get]] by recursing into the
prototype’s [[Get]] (parent->internal_get) when the property isn’t an
own property. For a sufficiently deep prototype chain, that C++
recursion exhausts the native stack, and segfaults. The bytecode
interpreter’s call-stack limit doesn’t cover this native recursion.

Fix: Before recursing into the prototype in Object::internal_get, check
VM::did_reach_stack_space_limit(), and throw a CallStackSizeExceeded
InternalError — the same way the interpreter and other recursive runtime
operations guard the native stack. The deep-chain get now throws a
catchable call-stack-size-exceeded error, rather than crashing.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/3584
2026-06-20 23:34:33 +02:00
..
AST LibJS: Fix destructured primitive string const loops 2026-05-22 01:56:57 +02:00
Bytecode LibJS: Preserve strict unresolvable assignment references 2026-05-22 14:30:35 +02:00
Runtime LibJS: Throw rather than crashing on a deep prototype-chain get 2026-06-20 23:34:33 +02:00
CMakeLists.txt LibJS: Materialize decoded bytecode cache blobs 2026-05-06 08:20:06 +02:00
test-bytecode-cache.cpp LibTextCodec: Remove unused PDFDocEncoding 2026-06-20 21:56:43 +02:00
test-js-ast.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js-bytecode.py LibJS: Support .mjs files in test-js-ast and test-js-bytecode 2026-02-19 12:02:50 +01:00
test-js.cpp LibJS: Cache entry modules before loading imports 2026-05-22 01:56:57 +02:00
test-primitive-string.cpp Tests/LibJS: Remove unneeded GC::Root use in PrimitiveString test 2026-05-29 17:21:17 +02:00
test-value-js.cpp LibJS: Make Value() default-construct the undefined value 2025-04-05 11:20:26 +02:00