The small test program from #166 makes rlwrap segfault after receiving an EOF (when I press CTRL+D on an empty line)
Without rlwrap it prints an endless stream of "> \n" after an EOF.
rlwrap yes "> " does not segfault, so the fact that the test program asks for input is relevant.
Debugging with rlwrap -d8 will print:
free() called twice, at string_utils.c:854: (on memory already freed at string_utils.c:818)
which gives a pretty good idea about what is happening. git blame shows that this is a regression introduced with 46aaddab7ac6355ad7a8ff1a698e9f23d3dfb02d, so it should be in all rlwrap versions from 0.44 onwards.
Note that it is not only the test program that would crash rlwrap. I would get occasional crashes myself, but this was the first reliably reproducible case.
The small test program from #166 makes
rlwrap
segfault after receiving anEOF
(when I press CTRL+D on an empty line)Without
rlwrap
it prints an endless stream of "> \n" after an EOF.rlwrap yes "> "
does not segfault, so the fact that the test program asks for input is relevant.Debugging with
rlwrap -d8
will print:which gives a pretty good idea about what is happening.
git blame
shows that this is a regression introduced with 46aaddab7ac6355ad7a8ff1a698e9f23d3dfb02d, so it should be in all rlwrap versions from0.44
onwards.