zsh-workers
 help / color / mirror / code / Atom feed
* Another missing HEAPALLOC
@ 1996-12-10  8:57 Peter Stephenson
  1996-12-11  0:56 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Stephenson @ 1996-12-10  8:57 UTC (permalink / raw)
  To: Zsh hackers list

% echo $zs
/home/sgi/pws/src/zsh-3.0.1/Src
% cd zs
BUG: permanent allocation in getstrvalue
~zs

PERMALLOC is set in bin_cd for calling cd_get_dest(), but the
parameter code in getnamedir() needs HEAPALLOC.  (Is this
getstrvalue() test new?  I've only just started noticing the error
messages.)  The following patch is chosen simply to make the minimum
code reorganisation necessary, but maybe the HEAPALLOC needs to be
further down in getstrvalue() or wherever, as Zoltan suggested.

*** Src/builtin.c~	Mon Dec  9 17:57:22 1996
--- Src/builtin.c	Tue Dec 10 09:48:52 1996
***************
*** 1180,1186 ****
  	for (rest = s; *rest && *rest != '/'; rest++);
  	save = *rest;
  	*rest = 0;
! 	s = getnameddir(s);
  	*rest = save;
  
  	if (s && *rest)
--- 1180,1188 ----
  	for (rest = s; *rest && *rest != '/'; rest++);
  	save = *rest;
  	*rest = 0;
! 	HEAPALLOC {
! 	    s = getnameddir(s);
! 	} LASTALLOC;
  	*rest = save;
  
  	if (s && *rest)

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-12-11  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-12-10  8:57 Another missing HEAPALLOC Peter Stephenson
1996-12-11  0:56 ` Zoltan Hidvegi

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).