Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Segfault on "task <Tab><Tab>" with zsh 5.0.2 (minimal dataset to reproduce the issue found)


On Tue, Sep 17, 2013 at 09:56:57AM +0100, Peter Stephenson wrote:
> It's not worth sending these unless they actually provide a way of
> making the crash easily reproducible, in which case please repost that
> information here.


I tried to get a reproducible data set and it took me a while to find
that TaskWarrior feature which causes the segfault: Annotations!

Here's how to reproduce the segfault:

abe@kiva6 % zsh -f
kiva6% autoload -Uz compinit
kiva6% compinit
kiva6% task
A configuration file could not be found in 

Would you like a sample /home/abe/.taskrc created, so taskwarrior can proceed? (yes/no) yes
[task next]
No matches.
kiva6% task add foo
Created task 1.
kiva6% task 1 annotate bar
Annotating task 1 'foo'.
Annotated 1 task.
kiva6% task [1]    4340 segmentation fault (core dumped)  zsh -f
abe@kiva6 % 

I built a tiny tar ball containing the resulting data files (and
generated config file), so to reproduce the issue, it should be
sufficient to have the following:

* The attached task-tab-completion-segfaults-zsh.tgz extracted into

  drwxr-xr-x abe/tar           0 2013-09-17 17:18 .task/
  -rw-r--r-- abe/tar         402 2013-09-17 17:18 .task/undo.data
  -rw-r--r-- abe/tar         150 2013-09-17 17:18 .task/pending.data
  -rw-r--r-- abe/tar           0 2013-09-17 17:18 .task/completed.data
  -rw-r--r-- abe/tar        1129 2013-09-17 17:18 .taskrc

* A recently compiled zsh 5.0.2 (probably with gcc 4.8).

* TaskWarrior 2.2.0 (e.g. from
  http://taskwarrior.org/projects/taskwarrior/wiki/Download --
  Distribution's package name is often still just "task" which was
  TaskWarrior's old name)

* The _task tab-completion file from the source tar-ball (see
  http://sources.debian.net/src/task/2.2.0-3/scripts/zsh/_task to just
  have a look) at some place where zsh looks for completions.

* Enter "task <Tab><Tab>" into a zsh.

> It might produce some sort of hint using "^X?" instead of the second
> tab.

Nothing, not even a newline or change of the cursor position.

Interestingly the next time, I tried it in the same shell, it
segfaulted on the _first_ Tab key-press.

I used ^U and an empty enter inbetween. At least I could reproduce it
that way multiple times.

		Kind regards, Axel
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | abe@xxxxxxxxxxxxxxx  (Mail)
 X   See http://www.asciiribbon.org/              | abe@xxxxxxxxx (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)

Messages sorted by: Reverse Date, Date, Thread, Author