Closed Daw588 closed 1 day ago
Get a very large file like 5GB video file and try to load it into the memory via Bun global:
await Bun.file("./very-large-file").arrayBuffer();
Note: This doesn't happen with NodeJS API readFile, as an error "out of memory" is thrown.
panic(main thread): Internal assertion failure
Bun v1.1.34 (5e5e7c6) on windows x86_64 [RunCommand]
5e5e7c6
panic: Internal assertion failure
ReadFile.zig:759
queueRead
queue.h:33
uv__queue_empty
req-inl.h:189
uv__process_reqs
core.c:657
uv_run
uws.zig:4145
tickWithTimeout
event_loop.zig:1522
waitForPromise
javascript.zig:1566
bindings.cpp:4855
JSC__VM__holdAPILock
Features: jsc, tsconfig
Sentry Issue: BUN-8KG
ah its supposed to throw an error
How can we reproduce the crash?
Get a very large file like 5GB video file and try to load it into the memory via Bun global:
Note: This doesn't happen with NodeJS API readFile, as an error "out of memory" is thrown.
Relevant log output
Stack Trace (bun.report)
Bun v1.1.34 (
5e5e7c6
) on windows x86_64 [RunCommand]panic: Internal assertion failure
ReadFile.zig:759
:queueRead
queue.h:33
:uv__queue_empty
req-inl.h:189
:uv__process_reqs
core.c:657
:uv_run
uws.zig:4145
:tickWithTimeout
event_loop.zig:1522
:waitForPromise
javascript.zig:1566
:waitForPromise
bindings.cpp:4855
:JSC__VM__holdAPILock
Features: jsc, tsconfig
Sentry Issue: BUN-8KG