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

signal handling bug



Here is a strange bug:

% zsh -f
hzoli% trap 'echo interrupt' INT
hzoli% while true ; do ; done
<press ^C many times quickly (eg. with an auto-repeating keyboard)>
interrupt
interrupt
BUG: empty(args) in exec.c
zsh: 1459 segmentation fault (core dumped)  zsh -f

The empry args message is very strange.  It can only happen if the
interrupt handler changes the args list of the interrupted execcmd()
function somehow.

The core dump comes from dotrap() in signals.c line 712 where the arguments
of the trap is freed after execution because someone already free'd that
(zsh-mem-warning  notices this).  Sometimes there is no coredump but after
a few interrupts the shell blocks the INT signal and continues execution.

Zoltan




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