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

Bug in ZSH 5.0.0 - Segmentation fault after sending process to background



Hi,

zsh version 5.0.0 crashes with a segfault if you have a custom precmd
specified (containing an additional command block), and sending a
process to the background.

The following steps are required to reproduce the bug:

scratchy% zsh --version
zsh 5.0.0 (x86_64-unknown-linux-gnu)
scratchy% cat test2.zshrc
precmd () {
   {}
}
scratchy% source test2.zshrc
scratchy% sleep 50 &; sleep 30
[1] 30889
^Z
zsh: suspended  sleep 30
zsh: segmentation fault  zsh

The segfault occurs in the hasprocs function in jobs.c, because the job
parameter has the value -1 (causes to an invalid memory access).

zsh was compiled with default settings. No special flags were set with
the configure script.

OS:
Arch Linux x64

Hope this informations are helpful.


Greets,
bluec0re
precmd () {
  {}
}


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