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

Jonas Falkevik jonas.falkevik@REDACTED
Mon Apr 7 09:21:36 CEST 2014


Hi,
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.

Jonas


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

https://github.com/falkevik/otp/compare/erlang:master...erl_shell_switch_command_crash_fix
https://github.com/falkevik/otp/compare/erlang:master...erl_shell_switch_command_crash_fix.patch

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


More information about the erlang-patches mailing list