* =(...)
@ 1996-05-13 8:46 Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 1996-05-13 8:46 UTC (permalink / raw)
To: Zsh hackers list
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 <pws@ifh.de> 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-05-13 8:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-13 8:46 =(...) Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).