Subject: Segfault when displaying completion lists
From: Christian Heinrich <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Mon, 08 Feb 2016 23:58:32 +0100
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Hello,

I'm running ZSH 5.2-3 on my Debian Testing system. This error existed
previously, too, but I only found the time today to find a minimal
setup for this. Here we go:

% zsh --norcs
% zmodload zsh/complist
% autoload -U compinit && compinit -d ~/.zsh/cache/zcompdump 
% zstyle ':completion:*' list-prompt '%p'
% bindkey -d
% ls /usr/lib/<TAB>
Now a huge list should be displayed with a pager. Press "Arrow Down"
and it should segfault.

This does not happen if the "zsh/complist" module is not loaded.

Another interesting observation:

After the <TAB>, press backspace instead of "arrow down" and remove the
whole command (do not accept the line). Type "bindkey -d" (yes, a 2nd
time) and accept. Type "ls /usr/lib/<TAB>" again and press backspace.
It segfaults now, although backspacing worked the first time.

Maybe someone can find the reason for this? I do have EDITOR="vim" set,
but it appears as if it happens with EDITOR="emacs" as well.

Thanks!

Christian