oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
72.03k stars 2.58k forks source link

Panic "unreachable code" on Windows when writing from stdin to stdout #12404

Closed unleashy closed 1 week ago

unleashy commented 1 week ago

How can we reproduce the crash?

await Bun.write(Bun.stdout, Bun.stdin);

That's all. From a cursory look at the code, it seems that you're calling GetFinalPathNameByHandle, and I guess stdin/out don't have names so it fails.

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.18 (5a0b935) on windows x86_64 [AutoCommand]

panic: reached unreachable code

Jarred-Sumner commented 1 week ago

Related https://github.com/ziglang/zig/issues/18756

unleashy commented 6 days ago

Cheers!