Subject: [BUG] Segfault when referencing $WIDGET in TRAPWINCH
From: Paul M <[email-masked]>
To: [email-masked]
Date: Mon, 06 Jun 2016 23:42:40 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Steps to reproduce:

1. add a TRAPWINCH something like this:

TRAPWINCH(){echo $WIDGET}

2. Open a terminal
3. Resize

zsh will segfault. GDB reports something like this

Program received signal SIGSERV, Segmentation fault.
0xXXXXX.. in ?? () from /usr/lib/x86_64-linux-gnu/zsh/5.0.2/zsh/zle.so

where 0xXXXXX is a memory address. This stays consistent(though varies
across machines).

N.B. This only happens if there has been no user interaction.

Pressing any key will prevent the error.  Pressing the space bar will
cause it to output magic-space for example (I'm guessing this causes
$WIDGET to be set, is some way, though trying to test if it was set with
echo ${WIDGET+x} also caused the crash).

Paul M