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

PATCH: Re: core dump with fc



Adam Spiers wrote:

> I have an alias for extracting from tar balls after looking at them
> (thanks Bart :-)
> 
> xt: aliased to fc -e - tvf=xf ztf=zxf -1
> 
> However ...
> 
> $ echo tvf
> $ xt
> zsh: 15486 segmentation fault (core dumped)  zsh
> 
> Stack trace follows.  This /doesn't/ happen if I start up with -f, but
> I'm hoping the bug is obvious enough that I won't have to narrow the
> problem down to one particular line in my huge .zshrc.

The next field of the `struct asgment's for the substitutions wasn't
initialised properly.

Bye
 Sven

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.4
diff -u -r1.4 builtin.c
--- Src/builtin.c	2000/04/04 14:08:56	1.4
+++ Src/builtin.c	2000/04/12 11:06:56
@@ -1224,6 +1224,7 @@
 	}
 	a->name = *argv;
 	a->value = s;
+	a->next = NULL;
 	argv++;
     }
     /* interpret and check first history line specifier */

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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