Fix stack overflow when inspecting circular JSX elements - #30021
Closed
robobun wants to merge 1 commit into
Closed
Claude / Claude Code Review
completed
May 1, 2026 in 21m 31s
Code review found 1 important issue
Found 2 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/bun.js/ConsoleObject.zig:1139 |
Same circular-JSX stack overflow remains in JestPrettyFormat (expect() diff output) |
Annotations
Check failure on line 1139 in src/bun.js/ConsoleObject.zig
claude / Claude Code Review
Same circular-JSX stack overflow remains in JestPrettyFormat (expect() diff output)
The same fix is needed in the sister formatter `src/bun.js/test/pretty_format.zig` — its `canHaveCircularReferences()` (lines 328-330) still omits `.JSX`, so a circular React element passed to a failing `expect()` matcher (e.g. `expect(el).toBe(null)`) still recurses unboundedly in `DiffFormatter` → `JestPrettyFormat` and SIGSEGVs. Mirroring this one-line change there (and ideally also adding `.Error`/`.Event`/`.Function`/`.Class` for parity) would close the remaining hole.
Loading