Skip to content

Guard AggregateError .errors printing against self-reference - #35820

Closed
robobun wants to merge 5 commits into
mainfrom
farm/f240f4dd/aggregate-error-cycle-guard
Closed

robobun wants to merge 5 commits into
mainfrom
farm/f240f4dd/aggregate-error-cycle-guard

Guard AggregateError .errors printing against self-reference and deep…

1943028
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 25, 2026 in 19m 53s

Code review found 1 important issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/node/util/bun-inspect.test.ts:106-111 StackCheck::init() seatings at print_exception entry points are untested

Annotations

Check failure on line 111 in test/js/node/util/bun-inspect.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

StackCheck::init() seatings at print_exception entry points are untested

The two new `formatter.stack_check = StackCheck::init()` seatings (VirtualMachine.rs:4472, jsc_hooks.rs:1197) are load-bearing for the deep-nesting case on the throw/reject paths, but no test covers them — the four subprocess tests use a *self-referential* AggregateError (caught by the cycle guard at depth 1), and the deep-nesting test uses `Bun.inspect` (which seats `stack_check` independently at ConsoleObject.rs:1439). Deleting both lines leaves every test green while re-introducing SIGSEGV fo