Steps to reproduce
Generate a page with 1272 nested <div>s and capture a screenshot with layout enabled:
n = 1272
html = '<div>' * n + 'x' + '</div>' * n
# serve it, then:
# moli fetch --layout --dump screenshot http://.../deep.html
Expected
A screenshot renders (Chrome 154 handles 5000 nesting levels fine).
Actual
thread 'render_runtime' has overflowed its stack
fatal runtime error: stack overflow, aborting
Process aborts with SIGABRT (rc=134).
Threshold (binary-searched)
| nesting levels |
result |
| 1271 |
ok (rc=0) |
| 1272 |
SIGABRT (rc=134) |
The threshold is identical on 1.1.9 (a54ba82) — not fixed, not regressed. Per-frame stack cost is ~6.7 KB against the 8 MiB render_runtime stack. --dump json / markdown paths are unaffected (no layout pass).
Suggestion
Iterativize the layout/paint recursion (explicit work queue instead of mutual recursion through compute_child_layout), or grow the render thread stack.
Environment
- moli 1.1.10 (9b2f86b), Linux,
--layout --dump screenshot
Steps to reproduce
Generate a page with 1272 nested
<div>s and capture a screenshot with layout enabled:Expected
A screenshot renders (Chrome 154 handles 5000 nesting levels fine).
Actual
Process aborts with SIGABRT (rc=134).
Threshold (binary-searched)
The threshold is identical on 1.1.9 (a54ba82) — not fixed, not regressed. Per-frame stack cost is ~6.7 KB against the 8 MiB
render_runtimestack.--dump json/markdownpaths are unaffected (no layout pass).Suggestion
Iterativize the layout/paint recursion (explicit work queue instead of mutual recursion through
compute_child_layout), or grow the render thread stack.Environment
--layout --dump screenshot