-
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
SegmentationFault at 26 when parsing json #826
Comments
Most likely this is a bug in |
Works fine when const data = await Bun.file('data.json').json();
console.log(data); Maybe when chaining it does not wait for the promise to be resolved? |
Edit: Just tested it again. It segfaulted after 20 successful attempts and again after 45 successful attempts. |
I still see the segfault with (my env is |
This is still an issue as of {"data":1} Bun.file("data.json").json().then(console.log); Then run |
Version
0.1.4
Platform
21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
What steps will reproduce the bug?
super simple code to reproduce here:
https://github.com/romanetsdev/bun-json-bug
run with:
bun run index.js
How often does it reproduce? Is there a required condition?
reproduces with unexpected frequency
What is the expected behavior?
log with parsed json object on every run
What do you see instead?
SegmentationFault at 26
–––– bun meta ––––
Bun v0.1.4 macOS Silicon 21.5.0
RunCommand:
Elapsed: 8ms | User: 9ms | Sys: 6ms
RSS: 19.15MB | Peak: 19.15MB | Commit: 69.22MB | Faults: 0
–––– bun meta ––––
Additional information
bun-json-bug.mov
The text was updated successfully, but these errors were encountered: