inspect, pretty_format, ipc, yaml: harden recursive walkers against stack overflow and dangling state - #34889
Closed
robobun wants to merge 4 commits into
Closed
inspect, pretty_format, ipc, yaml: harden recursive walkers against stack overflow and dangling state#34889robobun wants to merge 4 commits into
robobun wants to merge 4 commits into
Claude / Claude Code Review
completed
Jul 21, 2026 in 21m 13s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/bun/util/inspect.test.js:341-357 |
Deep-JSX console.log test may emit O(N²) bytes to stdout |
Annotations
Check warning on line 357 in test/js/bun/util/inspect.test.js
claude / Claude Code Review
Deep-JSX console.log test may emit O(N²) bytes to stdout
The "deep JSX tree" case here can push O(N²) bytes to the pipe before the RangeError fires: `print_jsx` writes `">\n"` + `write_indent_n(self.indent)` (2×indent spaces) at every level *before* recursing and never increments `self.depth`, so nothing bounds it except the stack check — plausibly thousands of levels in a release build ⇒ tens of MB flushed to stdout and then materialised as one JS string in the parent via `proc.stdout.text()` before `toEndWith` runs. The Proxy variant sharing this `i
Loading