Re: `set autologout = (15 1)' aborts

From: Christos Zoulas <christos_at_zoulas.com>
Date: Thu, 24 Jan 2008 15:17:31 -0500
On Jan 24,  3:37pm, keramida_at_freebsd.org (Giorgos Keramidas) wrote:
-- Subject: `set autologout = (15 1)' aborts

| Hi Christos, Mark and everyone,
| 
| The following is a patch which fixes an abort() in tcsh 6.15.00 on
| FreeBSD.  The proposed commit log explains why the change is needed,
| so if we can get this committed upstream to the tcsh sources, then it
| will find its way back to FreeBSD's src/contrib :)
| 
| %%%
| tcsh: fix abort in cleanup_until(), caused by internal xgetpass()
| 
| The xgetpass() function pushes a cleanup entry for &osa, but then
| attempts to flush the stack until an entry matching &sa.  The two
| object pointers do not match, so the stack is popped too much,
| and then cleanup_until calls abort() when it unexpectedly hits
| the bottom of the cleanup stack.
| 
| Reported by:	Paul B. Mahol, onemda at gmail.com,
| 		Pietro Cerutti, gahr at gahr.ch

thanks!

christos

| 
| diff -r 2cc0e20ca15b -r ea3fdd703cbf contrib/tcsh/tc.func.c
| --- a/contrib/tcsh/tc.func.c	Wed Jan 23 11:47:09 2008 +0000
| +++ b/contrib/tcsh/tc.func.c	Thu Jan 24 15:33:31 2008 +0200
| _at__at_ -632,7 +632,7 _at__at_
|      }
|      strbuf_terminate(&pass);
|  
| -    cleanup_until(&sa);
| +    cleanup_until(&osa);
|  
|      return pass.s;
|  }
| %%%
-- End of excerpt from Giorgos Keramidas
Received on Thu Jan 24 2008 - 19:35:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC