From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7415 invoked from network); 14 Jun 2000 14:29:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jun 2000 14:29:15 -0000 Received: (qmail 11043 invoked by alias); 14 Jun 2000 14:28:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11897 Received: (qmail 11029 invoked from network); 14 Jun 2000 14:28:24 -0000 Date: Wed, 14 Jun 2000 16:28:21 +0200 (MET DST) Message-Id: <200006141428.QAA03707@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Wed, 14 Jun 2000 15:03:04 +0100 Subject: Re: Wordcode functions with empty bodies Peter Stephenson wrote: > > If you can > > find a particular chunk of code which seems to be doing something wrong > > (shorter than the complete traps test) I'll have a look at it sometime. > > While I'm waiting, there's something obviously wrong with the way exit > tests are unset, but this looks too simple to be the source of everyone's > problems --- which generically stem from the fact that traps can take two > forms which are stored in the same place but manipulated in different ways. No need to wait... Try this: start with -f, autoload promptinit and call it. Then install break points at settrap(), freeeprog() and endtrapscope(). For even more fun, do `display sigfuncs[28]' (SIGWINCH). Now type `prompt bart'. It first hits some rather uninteresting break points, then settrap() which installs the handler for SIGWINCH (from setfunction() in parameter.c). Fine. Continue, it hits endtrapscode() and from there frees the eprog in sigfuncs[28]. BUT it doesn't reset sigfuncs[28]. Continue again until you get to the shell prompt. Type `echo ' (this makes the memory for the eprog be freed) and look at *sigfuncs[28]: garbage. If you want to get the full picture: set a break point at signals.c:675 and continue till there. It is now trying to dupeprog() the thing in sigfuncs[28] -- kaboom. So, where do we need to put the `sigfuncs[sig] = NULL'? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de