-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation fault on a particular env variable with Apple Silicon #554
Comments
After a rigorous process of hit and trial. This issue seems to appear only when the Key and the Value of the env is exactly of length 15 |
Super interesting |
I confirm. Only in scaffolded React project. Works fine in a basic:
export default {
port: 3000,
fetch(request) {
return new Response(process.env.WELCOME_MESSAGE);
}
} for example |
I'm also getting segfault errors if there are blank lines in any .env files. |
Exactly the same issue, with .env, just containing:
If the string content has a different length, it works, but not with that combination. |
Confirming this is still an issue. Here's the reproduction: // .env
WELCOME_MESSAGE=ReactAppWithBun // index.js
export default {
port: 3000,
fetch(request) {
return new Response(process.env.WELCOME_MESSAGE);
}
} Output: SegmentationFault at 0x753700F300000000
----- bun meta -----
Bun v0.2.2 (88ddb103) macOS Silicon 21.5.0
RunCommand: bun_bun dotenv
Elapsed: 25ms | User: 18ms | Sys: 7ms
RSS: 20.61MB | Peak: 20.61MB | Commit: 67.11MB | Faults: 5
----- bun meta ----- |
I'm not able to reproduce this as of v0.4.0+ (tested 0.4, 0.5, 0.5.7, and 0.5.8), but please leave a comment/reopen if still happening |
Version
0.1.2
Platform
Darwin Kernel Version 21.5.0
What steps will reproduce the bug?
The bug (?) only presents with that particular env variable. Works well with every other variables I've tested.
How often does it reproduce? Is there a required condition?
All the time in React App created with bun create react
What is the expected behavior?
Correctly displaying the values of the env variables.
What do you see instead?
Segmentation fault error
Additional information
Just adding one letter at the end of the env variable everything turns to work normally

The text was updated successfully, but these errors were encountered: