Skip to content
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 when importing invalid JSON #17968

Closed
mirelon opened this issue Mar 7, 2025 · 2 comments
Closed

Segmentation fault when importing invalid JSON #17968

mirelon opened this issue Mar 7, 2025 · 2 comments
Labels
crash An issue that could cause a crash linux An issue that occurs on Linux runtime

Comments

@mirelon
Copy link

mirelon commented Mar 7, 2025

How can we reproduce the crash?

bun init

a.json is empty file (or any invalid JSON)
a.ts:

import ajson from './a.json'
type A = {a: number}
const a: A = ajson

Then run:

bun run a.ts

Relevant log output

============================================================
Bun v1.2.3 (8c4d3ff8) Linux x64
Linux Kernel v6.11.0 | glibc v2.39
CPU: sse42 popcnt avx avx2
Args: "bun" "run" "a.ts"
Features: jsc tsconfig 
Builtins: "bun:main" 
Elapsed: 19ms | User: 6ms | Sys: 19ms
RSS: 1.07GB | Peak: 34.93MB | Commit: 1.07GB | Faults: 0

panic(main thread): Segmentation fault at address 0x5
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.2.3/lr18c4d3ffEgggQo083pE+ypRoyh9hE6x5ljEm/z3nF_6/ms+D6/ms+D6/ms+D60vs+DA2AK

Illegal instruction (core dumped)

Stack Trace (bun.report)

Bun v1.2.3 (8c4d3ff) on linux x86_64 [TestCommand]

Segmentation fault at address 0x00000000

Features: tsconfig, jsc

Sentry Issue: BUN-DT1

@mirelon mirelon added the crash An issue that could cause a crash label Mar 7, 2025
@github-actions github-actions bot added linux An issue that occurs on Linux runtime labels Mar 7, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

@mirelon, the latest version of Bun is v1.2.4, but this crash was reported on Bun v1.2.3.

Are you able to reproduce this crash on the latest version of Bun?

bun upgrade

@mirelon
Copy link
Author

mirelon commented Mar 7, 2025

Sorry, duplicate of #17605
In 1.2.4 is works

@mirelon mirelon closed this as completed Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash linux An issue that occurs on Linux runtime
Projects
None yet
Development

No branches or pull requests

1 participant