From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4159 invoked from network); 26 Sep 1999 17:35:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Sep 1999 17:35:04 -0000 Received: (qmail 15906 invoked by alias); 26 Sep 1999 17:34:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8056 Received: (qmail 15899 invoked from network); 26 Sep 1999 17:34:56 -0000 Message-Id: <9909261659.AA16793@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: BUG: permanent allocation in mathevall In-Reply-To: ""Bart Schaefer""'s message of "Sun, 26 Sep 1999 17:21:27 DFT." <990926172127.ZM5048@candle.brasslantern.com> Date: Sun, 26 Sep 1999 18:59:26 +0200 From: Peter Stephenson "Bart Schaefer" wrote: > If you look again at the stack trace I sent, you'll see that TMOUT is a > special case; the code looks like this: > > int tmout; > dotrap(SIGALRM); > if ((tmout = getiparam("TMOUT"))) > alarm(tmout); /* reset the alarm */ > > Outside of dotrap(), global allocation is in effect. Inside the trap > function itself, heap allocation is. OK, then use this instead of 8049. The allocation at this point is undetermined, since it's in the signal handler, so this certainly seems safeer. Presumably global allocation is in effect only because it is in zleread(). --- Src/signals.c.ha Thu Sep 2 10:09:24 1999 +++ Src/signals.c Sun Sep 26 18:52:31 1999 @@ -523,8 +523,10 @@ if (sigtrapped[SIGALRM]) { int tmout; dotrap(SIGALRM); - if ((tmout = getiparam("TMOUT"))) - alarm(tmout); /* reset the alarm */ + HEAPALLOC { + if ((tmout = getiparam("TMOUT"))) + alarm(tmout); /* reset the alarm */ + } LASTALLOC; } else { int idle = ttyidlegetfn(NULL); int tmout = getiparam("TMOUT"); -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy