Skip to content

bundler: give the bundle thread a 16 MiB stack - #38862

Closed
alii wants to merge 1 commit into
mainfrom
ali/bundle-thread-stack
Closed

bundler: give the bundle thread a 16 MiB stack#38862
alii wants to merge 1 commit into
mainfrom
ali/bundle-thread-stack

give the bundle thread a 16 mib stack

0848750
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 15, 2026 in 9m 29s

Code review found 1 important issue

Found 4 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/bundler/bun-build-api.test.ts:46-62 Crash-regression test should spawn a subprocess
🟡 Nit test/bundler/bun-build-api.test.ts:56 write: false is not a Bun.build option

Annotations

Check failure on line 62 in test/bundler/bun-build-api.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Crash-regression test should spawn a subprocess

This crash-regression test calls `Bun.build()` in-process, but the failure mode it guards against is `AddressSanitizer: stack-overflow` on the bundle thread — a process abort, not a catchable error. Per REVIEW.md ("Crash fixes need the crashing input as a spawned fixture"), and matching the "loader map with an empty-string key" test in this same file, wrap the `Bun.build()` call in a `Bun.spawn([bunExe(), "-e", ...])` subprocess and assert on `{stdout, stderr, exitCode}` so a regression fails ju

Check warning on line 56 in test/bundler/bun-build-api.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

write: false is not a Bun.build option

`write` is not a `Bun.build` option — it's not in the `BuildConfig` interface (packages/bun-types/bun.d.ts) and `JSBundler.rs` never reads it, so this line is a silently-ignored no-op that will fail typecheck against the published types. Bun.build already returns in-memory outputs whenever `outdir` is omitted (see the neighboring "css works" test), so just drop the `write: false` line.