Changelog

oven-sh/bun · · 1 commit

Fix maxBuffer overreads in spawn

Bun now stops reading as soon as maxBuffer is exceeded, preventing chatty child processes from growing output beyond the limit while the kill catches up.

spawn: stop reading once maxBuffer is exceeded (robobun5d76ac6)

Bun now stops the pipe reader immediately when maxBuffer is crossed, instead of only killing the child and continuing to accumulate output while termination is asynchronous. This closes a memory-overrun gap and brings spawnSync behavior in line with Node.js for oversized child output.

Other misc changes

  • Updated child-process docs to explain the new maxBuffer behavior
  • Added/updated spawn maxBuffer regression coverage