Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2008 15:37:09 +0200
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Christos Zoulas <christos@zoulas.com>, Mark Peek <mp@freebsd.org>, tcsh-bugs@mx.gw.com, current@freebsd.org
Subject:   `set autologout = (15 1)' aborts
Message-ID:  <20080124133708.GA2220@kobe.laptop>

next in thread | raw e-mail | index | archive | help
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

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;
 }
%%%



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