oven-sh / bun

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

`bunx cowsay ""` - panic: reached unreachable code #13316

Open RiskyMH opened 1 month ago

RiskyMH commented 1 month ago

How can we reproduce the crash?

bunx cowsay "" on windows (note any package seems to crash with empty input in quotation marks, cowsay is just simple example)

Relevant log output

============================================================
Bun v1.1.24 (85a32991) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2 avx512
Args: "bunx" "cowsay" ""
Elapsed: 12ms | User: 15ms | Sys: 15ms
RSS: 22.01MB | Peak: 22.01MB | Commit: 61.36MB | Faults: 5508

panic(main thread): reached unreachable code
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.1.24/wB185a3299AA0l+5FqqinFoq4mFq5w8FqzgBi8I4p2p7CCYKERNEL32.DLLu+tLCSntdll.dll4002BA1

Stack Trace (bun.report)

Bun v1.1.24 (85a3299) on windows x86_64 [BunxCommand]

panic: reached unreachable code

nektro commented 1 month ago

currently triaging what the expected behavior should be. https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter has some good reading on the topic.

if this is blocking you, bunx cowsay """" as input gets the equivalent posix behavior

RiskyMH commented 1 month ago

Thank you for the response, this is a pretty not important issue but I reported as it's a "crash" that probably shouldn't crash. This was more found when I was trying to test how fast it was and then interested on what empty string would yield.

Personally, I would expect it to either give arg of empty string to program or just none at all.