zsh-workers
 help / color / mirror / code / Atom feed
* Bug in ZSH 5.0.0 - Segmentation fault after sending process to background
@ 2012-10-11 13:46 BlueC0re
  2012-10-11 14:35 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: BlueC0re @ 2012-10-11 13:46 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

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

[-- Attachment #2: test2.zshrc --]
[-- Type: text/plain, Size: 20 bytes --]


precmd () {
  {}
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-11 15:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11 13:46 Bug in ZSH 5.0.0 - Segmentation fault after sending process to background BlueC0re
2012-10-11 14:35 ` Peter Stephenson
2012-10-11 15:52   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).