Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2008 15:17:31 -0500
From:      christos@zoulas.com (Christos Zoulas)
To:        Giorgos Keramidas <keramida@freebsd.org>, Mark Peek <mp@freebsd.org>,  tcsh-bugs@mx.gw.com, current@freebsd.org
Subject:   Re: `set autologout = (15 1)' aborts
Message-ID:  <20080124201731.2611E56544@rebar.astron.com>
In-Reply-To: <20080124133708.GA2220@kobe.laptop> from Giorgos Keramidas (Jan 24,  3:37pm)

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 24,  3:37pm, keramida@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
| @@ -632,7 +632,7 @@
|      }
|      strbuf_terminate(&pass);
|  
| -    cleanup_until(&sa);
| +    cleanup_until(&osa);
|  
|      return pass.s;
|  }
| %%%
-- End of excerpt from Giorgos Keramidas





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080124201731.2611E56544>