zsh-workers
 help / color / mirror / code / Atom feed
* allocation bug
@ 1996-11-29 12:43 Peter Stephenson
  1996-12-04 11:01 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 1996-11-29 12:43 UTC (permalink / raw)
  To: Zsh hackers list


% echo | cat & 
[1] 20940 20941
% 

[1]  + 20940 done       echo | 
       20941 done       cat
BUG: permanent allocation in getstrvalue

-- 
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] 5+ messages in thread

* Re: allocation bug
  1996-11-29 12:43 allocation bug Peter Stephenson
@ 1996-12-04 11:01 ` Peter Stephenson
  1996-12-04 21:13   ` Zoltan Hidvegi
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 1996-12-04 11:01 UTC (permalink / raw)
  To: zsh-workers

I wrote:
> % echo | cat & 
> [1] 20940 20941
> % 
> 
> [1]  + 20940 done       echo | 
>        20941 done       cat
> BUG: permanent allocation in getstrvalue

This comes from the REPORTTIME code.  Presumably it showed up here
because the job exited and caused a SIGCHLD while zle was active.
Maybe there's more possible nastiness in code that can get called from
the signal handler?

*** Src/jobs.c~	Tue Nov 26 09:55:31 1996
--- Src/jobs.c	Wed Dec  4 11:05:09 1996
***************
*** 654,666 ****
      static long clktck = 0;
      Value v;
      char *s = "REPORTTIME";
!     int reporttime;
  
      /* if the time keyword was used */
      if (j->stat & STAT_TIMED)
  	return 1;
  
!     if (!(v = getvalue(&s, 0)) || (reporttime = getintvalue(v)) < 0)
  	return 0;
  
      /* can this ever happen? */
--- 654,669 ----
      static long clktck = 0;
      Value v;
      char *s = "REPORTTIME";
!     int reporttime, itest;
  
      /* if the time keyword was used */
      if (j->stat & STAT_TIMED)
  	return 1;
  
!     HEAPALLOC {
! 	itest = !(v = getvalue(&s, 0)) || (reporttime = getintvalue(v)) < 0;
!     } LASTALLOC;
!     if (itest)
  	return 0;
  
      /* can this ever happen? */

-- 
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] 5+ messages in thread

* Re: allocation bug
  1996-12-04 11:01 ` Peter Stephenson
@ 1996-12-04 21:13   ` Zoltan Hidvegi
  0 siblings, 0 replies; 5+ messages in thread
From: Zoltan Hidvegi @ 1996-12-04 21:13 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

Peter Stephenson wrote:
> This comes from the REPORTTIME code.  Presumably it showed up here
> because the job exited and caused a SIGCHLD while zle was active.
> Maybe there's more possible nastiness in code that can get called from
> the signal handler?

Yes, you get the same when the shell reads TMOUT.  There is a potentional
memory leak when the requested variable is an array.  Perhaps it would be
better to put HEAPALLOC into getstrvalue or to the place where arrays are
joined.

Zoltan


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

* Re: Allocation bug
  1999-09-26 17:03 Allocation bug Peter Stephenson
@ 1999-09-27 15:55 ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 1999-09-27 15:55 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> Talking of allocation, although this seems to be totally separate and to do
> with completion: with autoselection,
> 
> % print $MA<TAB>
> MACHTYPE     MAILDROP     MAILSERVER   mailpath     manpath                 
> MAILCHECK    MAILPATH     MANPATH      mailpref     mapfile                 
> 
> where MACHTYPE is highlighted.  Using down arrow gives me the message
> BUG: permanent allocation in prefork 

Well, domenuselect() is an alternative completion entry point to
docompletion(), so presumably HEAPALLOC needs to be set in the same way.
Indeed there are more of those pesky dupstruct()s around which must be
assuming it's already in effect.  So this should fix it.  Sorry about the
size:  all but two lines are simply indentation, but I'll `get wrong' if I
don't submit the whole thing.  Now, why didn't I see that message until
now?

I still can't help feeling we've taken a wrong turning with this allocation
business.  There should be some way of being more explicit about what to
use and yet flexible where necessary.

begin 644 ha.dif.gz
M'XL("/Z1[S<``VAA+F1I9@#E6]MNW#@2?9:_@LZ#H;:LC#N311!W'"0(`LP"
M3G8Q\;SL8#:0U7*W-KI!%SOQC/]]JWA34:(N;3N>P6X>XA99+))5AU6'I.3[
M/OM4AC_\*XE^"/.T2.*J?AH^W0;.^;9AGZ*"/?N1+9<GQR].CI^SY<N7+_<\
MS[,T<3[DF9!_P98O3IZ_.%D^$_)OWC#_;\^71S\>OV0>_[%<LC=O]AC^B[.:
MQ>R4'1^Q(`S%C^NXVH9Y(AZJJ,9G?%B))N$V*-EA!4][/E=QR=S+=5"S/_Y@
M[KI)TV_LX("Y^VX%C391715!&:3NDT_OS]Z_.__P]X]/%@N0W?,=QX'F+C:%
M!O#'?YTU*7O%@CJ/W6J!_]CO(*=Z$$_8YR673H,ZW$;8#7U<&3*H\50K7^UY
M6/73^[?_?'MV]H]WH-!S[CH!3TR`S9F$YU!3B1)G?!9:H#<%KNM6_CU[^^F<
MS^7SS^_/?_GY(_>3<PM&**.Z*3-\]D4#7YE%J)/E591$89WD89"D0>&FU9?H
M&_Q8R.HL%P("`;PHU27NH9O&V67^-&S*Q<)_O>$#%/WD)7-7*^&S:IM?Q]D&
MH0JM_&?HHYLRNBRC:NMB3TZ<::7+E?2YZGHA/7I11L$75;D?MW!`!*<`V8H=
MLC2)LQ8$U]LXB9@;^SXJX0W3.KCX-?Z-/QM:E8=`,]B6VLESAHWD.::%/&?*
M/*"[M8UP8M\^HIS:2$+(L%,+J]96S'',*2F3(B8*M!1:H,"28H./&_6HQPJE
MAZ1D4^9-P<LVROHR+"C/M"$#W8!"45)%?&!8P%XKB=9GTC.R^AA73_&KO_R-
MG8(2;31T$HKX_A$K^'\;W^>3868/K\9[>"7QX;.EZ&FH(\^#/OA_&\]35C."
MH$>!(A:R#7]03,'G.;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arroti 2, 56127 Pisa, Italy


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

* Allocation bug
@ 1999-09-26 17:03 Peter Stephenson
  1999-09-27 15:55 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 1999-09-26 17:03 UTC (permalink / raw)
  To: Zsh hackers list

Talking of allocation, although this seems to be totally separate and to do
with completion: with autoselection,

% print $MA<TAB>
MACHTYPE     MAILDROP     MAILSERVER   mailpath     manpath                 
MAILCHECK    MAILPATH     MANPATH      mailpref     mapfile                 

where MACHTYPE is highlighted.  Using down arrow gives me the message
BUG: permanent allocation in prefork 

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

end of thread, other threads:[~1999-09-27 16:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-29 12:43 allocation bug Peter Stephenson
1996-12-04 11:01 ` Peter Stephenson
1996-12-04 21:13   ` Zoltan Hidvegi
1999-09-26 17:03 Allocation bug Peter Stephenson
1999-09-27 15:55 ` 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).