Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: allocation bug



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@xxxxxx>       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.



Messages sorted by: Reverse Date, Date, Thread, Author