Files
bun.sh/src
Claude Bot 15ebc6a182 fix(spawn): protect ReadableStream from GC when used as stdin via Response
When `stdin: new Response(data)` is passed to `Bun.spawn`, the Response
body is converted to a ReadableStream and stored in the Stdio union.
Previously, this stored a bare ReadableStream (containing only a raw
JSValue), which was not protected from garbage collection. Between
extraction and when FileSink.assignToStream() creates a Strong reference,
process spawning and option processing could trigger GC cycles that
collect the unprotected ReadableStream, causing heap corruption.

Fix by changing Stdio.readable_stream from ReadableStream to
ReadableStream.Strong, which holds a C++ JSC Strong reference that
prevents the GC from collecting the stream value.

Closes #26979

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-12 21:30:49 +00:00
..
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2026-02-03 22:18:40 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-12-25 14:00:58 -08:00
2025-11-10 14:38:26 -08:00
2025-10-04 02:17:55 -07:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2026-01-07 12:33:21 -08:00
2025-11-10 14:38:26 -08:00
2025-11-20 20:56:02 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2026-01-30 01:38:45 -08:00
2025-12-01 21:59:11 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00
2025-11-10 14:38:26 -08:00