[erlang-patches] Fix shell crash when in switch command mode

Jonas Falkevik <>
Mon Apr 7 09:21:36 CEST 2014

there has been at least one known case where if accidentally hitting ctrl-y when in the shell switch mode (ctrl-g)
which makes the user_drv process crash and it is not easily recovered.

The crash is due to the switch mode using edlin to parse its input.
And edlin uses the process dictionary to store its kill_buffer. Emacs look alike.
However the kill_buffer is undefined if not initialized by edlin:init/0
and that makes the user_drv process crash if ctrl-y is hit, since edlin is calling list:reverse/2 with the atom undefined.

The patch below is to prevent the crash from happening by initializing edin once.


git fetch git://github.com/falkevik/otp.git erl_shell_switch_command_crash_fix


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20140407/12123163/attachment.html>

More information about the erlang-patches mailing list