From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4081 invoked from network); 26 Sep 1999 17:21:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Sep 1999 17:21:40 -0000 Received: (qmail 14824 invoked by alias); 26 Sep 1999 17:21:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8054 Received: (qmail 14817 invoked from network); 26 Sep 1999 17:21:31 -0000 From: "Bart Schaefer" Message-Id: <990926172127.ZM5048@candle.brasslantern.com> Date: Sun, 26 Sep 1999 17:21:27 +0000 In-Reply-To: <9909261402.AA16846@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: BUG: permanent allocation in mathevall" (Sep 26, 4:02pm) References: <9909261402.AA16846@ibmth.df.unipi.it> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: BUG: permanent allocation in mathevall MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 26, 4:02pm, Peter Stephenson wrote: } Subject: Re: BUG: permanent allocation in mathevall } } "Bart Schaefer" wrote: } > I'm getting the "BUG: permanent allocation in mathevall" message every time } > my TRAPALRM function fires. } > } > It's happening below getiparam("TMOUT"): } } It doesn't seem to be happening with TRAPUSR1, though: compare } } TRAPUSR1() { integer i; i=4; print i is $i; } } kill -USR1 $$ } } with the same function as TRAPALRM with a non-zero timeout. Slightly odd. I should have looked more closely at this before reporting it ... 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. It looks like that's the only place where getiparam() is called in a global allocation context, so maybe it'd be sufficient to put HEAPALLOC() around that one call, rather than inside mathevall(). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com