Closed irisjae closed 11 months ago
What is your exact rlwrap
command line? And, while we're at it, what is the output of rlwrap -v
and ldd $(which rlwrap)
?
I see one possibility for this to happen (although I cannot provoke the crash that way) : if you specify '-a' ('--always-readline') and '-N' ('--no-children'), and "waiting for a child" is the first thing rlwrap
encounters after startup
I can indeed reproduce the bug this way: (rlwrap -a -N -tdumb bash
and then man man
inside the rlwrap
ped bash
)
rlwrap -v
gives rlwrap 0.46
, and ldd $(which rlwrap)
gives the following:
linux-vdso.so.1 (0x0000fffff7ffb000)
libutil.so.1 => /nix/store/jxjy8r4k8pf7v0hasi37qgva9va81kj2-glibc-2.37-8/lib/libutil.so.1 (0x0000fffff7fa7000)
libreadline.so.8 => /nix/store/2883bbi2bjd6rw7djmc07saym8shpla2-readline-8.2p1/lib/libreadline.so.8 (0x0000fffff7f40000)
libncursesw.so.6 => /nix/store/krkgdpvfrzq723ndy7mmkcr0wb7f7qqy-ncurses-6.4/lib/libncursesw.so.6 (0x0000fffff7ebf000)
libc.so.6 => /nix/store/jxjy8r4k8pf7v0hasi37qgva9va81kj2-glibc-2.37-8/lib/libc.so.6 (0x0000fffff7d11000)
/nix/store/jxjy8r4k8pf7v0hasi37qgva9va81kj2-glibc-2.37-8/lib/ld-linux-aarch64.so.1 => /nix/store/lyirwifzfwjxsqal7dzcx6dbn1i4v50a-glibc-2.34-115/lib/ld-linux-aarch64.so.1 (0x0000fffff7fc8000)
As you can see, I'm using the Nix package manager. My version of node is v16.15.0
.
My exact command is rlwrap -S '>' -w 40 -a -N ./my-script
.
I've managed to reproduce the problem independent of my code running within node. Using the same form of rlwrap invocation, rlwrap -S '>' -w 40 -a -N node
works, however if you put a single line containing node
in a some file my-script like echo node > my-script; chmod +x my-script
, rlwrap -S '>' -w 40 -a -N ./my-script
gives the reported bug.
When I try rlwrap -a -N -tdumb bash
and man man
, it does indeed seem to provoke a crash with the same assertion error (after messing up my terminal while I'm typing man man).
Hi, I've run into this error recently on my M1 machine, when wrapping my node script in rlwrap. Wrapping the same script with rlwrap works on Darwin but fails on Linux for some reason.
I'll investigate this problem in a bit. Have you got any pointers for me to look at? Thanks.