From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7860 invoked from network); 9 Jun 2000 14:03:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 2000 14:03:05 -0000 Received: (qmail 8677 invoked by alias); 9 Jun 2000 14:02:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11837 Received: (qmail 8670 invoked from network); 9 Jun 2000 14:02:50 -0000 Date: Fri, 9 Jun 2000 10:02:41 -0400 From: Clint Adams To: zsh-workers@sunsite.auc.dk Subject: trap handling segfault Message-ID: <20000609100241.B21890@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i The following snippet will cause 3.1.9 to die with a SEGV (in gdb it dumps at the blank line just before the declaration of periodic(), without gdb it dumps when periodic is actually called). I haven't looked at this in depth, but it's dying in endtrapscope() when it tries to dereference st->list->funcdef (when st->list happens to be NULL). Reversing 11736 smoothes things out. ----8<---- function TRAPEXIT () { /bin/rm -f /tmp/jobs$HOST$$ } function set-title () { if [[ "$1" = "-k" ]] then shift KEPT_TITLE="$* " else TITLE=$* fi [[ "$TERM" = "xterm" ]] && print -n -D -P "\033]2;${KEPT_TITLE}${TITLE}\007" } function accept-line { local cmd=${BUFFER%%" "*} local oldtitle=$TITLE [[ -n "$cmd" ]] && set-title $TITLE "->" $cmd TITLE=$oldtitle zle .accept-line } zle -N accept-line function periodic () { } ----8<----