<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div><div>there has been at least one known case where if accidentally hitting ctrl-y when in the shell switch mode (ctrl-g)</div><div>which makes the user_drv process crash and it is not easily recovered.</div><div><span class="Apple-style-span" style="white-space: pre-wrap; "><br></span></div><div><span class="Apple-style-span" style="white-space: pre-wrap; ">The crash is due to the switch mode using edlin to parse its input.</span></div><div><span class="Apple-style-span" style="white-space: pre-wrap; ">And edlin uses the process dictionary to store its kill_buffer. Emacs look alike.</span></div><div><span class="Apple-style-span" style="white-space: pre-wrap; ">However the kill_buffer is undefined if not initialized by edlin:init/0</span></div><div><span class="Apple-style-span" style="white-space: pre-wrap; ">and that makes the user_drv process crash if ctrl-y is hit, since edlin is calling list:reverse/2 with the atom undefined.</span></div><div><span class="Apple-style-span" style="white-space: pre-wrap; "><br></span></div><div>The patch below is to prevent the crash from happening by initializing edin once.</div><div><br></div><div>Jonas</div><div><br></div><div><br></div><div>git fetch <a href="git://github.com/falkevik/otp.git">git://github.com/falkevik/otp.git</a> <a href="https://github.com/falkevik/otp/compare/erlang:master...erl_shell_switch_command_crash_fix.patch">erl_shell_switch_command_crash_fix</a></div><div><br></div><div><a href="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</a></div><a href="https://github.com/falkevik/otp/compare/erlang:master...erl_shell_switch_command_crash_fix.patch">https://github.com/falkevik/otp/compare/erlang:master...erl_shell_switch_command_crash_fix.patch</a><div><br></div></body></html>