You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warn when running on an unsupported x86_64 version
Refuse to install from on an unsupported x86_64 version
Refuse to run on an unsupported x86_64 version
What do you see instead?
Memory Leak + Segmetation Fault
Additional information
This was discovered when using Coder to spin up a VM in Proxmox. Without configuring anything the CPUs type was set to qemu64, which had fewer available instructions, than the host CPU. After setting the type to host bun worked as expected. To me it seemed that qemu64 is equivalent to x86_64v1. The host CPU supports x86_64v3.
I assume Bun is being compiled for either x86_64v2 or v3 and thus an illegal instruction caused a segmentation fault. If that is how your binaries are build I would suggest checking for the CPUs instructionset and at least showing a warning when executing bun, but my recommendation would be refusing to install it from the script and instructing to compiling it from source instead.
Note: This was also reproduced in the latest canary version.
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.1.12+43f0913c3
What platform is your computer?
Linux 6.1.0-17-cloud-amd64 x86_64 unknown
What steps can reproduce the bug?
Run Bun on an old x86 CPU (we used x86_64v1) or use the qemu64 CPU.
Execute
bun run example.ts
with the following fileWhat is the expected behavior?
At least one of the following:
What do you see instead?
Memory Leak + Segmetation Fault
Additional information
This was discovered when using Coder to spin up a VM in Proxmox. Without configuring anything the CPUs
type
was set toqemu64
, which had fewer available instructions, than the host CPU. After setting thetype
tohost
bun worked as expected. To me it seemed that qemu64 is equivalent to x86_64v1. The host CPU supports x86_64v3.I assume Bun is being compiled for either x86_64v2 or v3 and thus an illegal instruction caused a segmentation fault. If that is how your binaries are build I would suggest checking for the CPUs instructionset and at least showing a warning when executing bun, but my recommendation would be refusing to install it from the script and instructing to compiling it from source instead.
Note: This was also reproduced in the latest canary version.
The text was updated successfully, but these errors were encountered: