Segfault with readline #15344
Labels
confirmed bug
We can reproduce this issue
crash
An issue that could cause a crash
linux
An issue that occurs on Linux
node:readline
How can we reproduce the crash?
I encountered segfaults while using the Plop code generator, which internally relies on CLI tools like
inquirer
(for user input) orora
(progress). After running a generator, the process would hang, and pressing Enter would cause a segfault.I've isolated the issue to
readline
when it's closed immediately after being created.Minimal Reproduction Code
Observations
rl2
exists (withoutrl1
), the process hangs but does not segfault.rl1
andrl2
are used, pressing Enter after therl1
prompt results in a segfault.rl2.close()
call insetTimeout(..., 0)
prevents the segfault.Relevant log output
Stack Trace (bun.report)
Bun v1.1.37-canary (
4117af6
) on linux x86_64 [AutoCommand]Segmentation fault at address 0x0000001A
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
ld-temp.o:0
:llint_op_call_ignore_result
Features: Bun.stdin, Bun.stdout, dotenv, jsc, tsconfig, tsconfig_paths, tsconfig_paths
Sentry Issue: BUN-4KP
The text was updated successfully, but these errors were encountered: