Fix shell crash when in switch command mode
Jonas Falkevik <[email protected]> Mon, 7 Apr 2014 09:21:36 +0200
| Newsgroups | gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ erlang-patches mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-patches