From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id SAA01605 for ; Mon, 13 May 1996 18:54:30 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA15987; Mon, 13 May 1996 04:46:48 -0400 (EDT) Resent-Date: Mon, 13 May 1996 04:46:48 -0400 (EDT) Message-Id: <199605130846.KAA14462@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: =(...) Date: Mon, 13 May 1996 10:46:17 +0200 From: Peter Stephenson Resent-Message-ID: <"z3I-W2.0.jv3.tRlbn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1061 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu With zsh 2.6 beta17 I'm getting: 10:41% print =(cat ~/.zshrc) =(cat ~/.zshenv) /tmp/zshb007F- /tmp/zshb007F- which is bad news. The problem is the use of heaps in getoutputfile(): the filename returned is on a heap which is popped. A safe fix is to return the ztrdup'd value which is saved in the jobtable, since that only gets deleted when the file itself is. (Alternatively, return a dupstring'd version of the ztrdup'd nam after the popheap, but I think that's unnecessary.) *** Src/exec.c.eqsub Mon May 13 10:13:25 1996 --- Src/exec.c Mon May 13 10:40:30 1996 *************** *** 2027,2037 **** if (!(list = parsecmd(cmd))) return NULL; ! nam = gettempname(); permalloc(); if (!jobtab[thisjob].filelist) jobtab[thisjob].filelist = newlinklist(); ! addlinknode(jobtab[thisjob].filelist, ztrdup(nam)); heapalloc(); child_block(); --- 2027,2037 ---- if (!(list = parsecmd(cmd))) return NULL; ! nam = ztrdup(gettempname()); permalloc(); if (!jobtab[thisjob].filelist) jobtab[thisjob].filelist = newlinklist(); ! addlinknode(jobtab[thisjob].filelist, nam); heapalloc(); child_block(); -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.