`set autologout = (15 1)' aborts

Giorgos Keramidas keramida at freebsd.org
Thu Jan 24 05:51:56 PST 2008


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


More information about the freebsd-current mailing list