Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: dirstack=(/) dumps core
- X-seq: zsh-workers 9938
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: dirstack=(/) dumps core
- Date: Tue, 29 Feb 2000 17:09:17 +0100 (MET)
- In-reply-to: Tanaka Akira's message of 01 Mar 2000 00:10:02 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> I heard that assignment to dirstack may cause core dump. I can get
> core on linux.
>
> Z:akr@thorax% unlimit coredumpsize
> Z:akr@thorax% zsh -f
> thorax% dirstack=(/)
> zsh: segmentation fault (core dumped) zsh -f
> Z:akr@thorax%
Oops.
Bye
Sven
--- ../z.old/Src/Modules/parameter.c Tue Feb 29 13:11:10 2000
+++ Src/Modules/parameter.c Tue Feb 29 17:05:59 2000
@@ -967,14 +967,16 @@
static void
dirssetfn(Param pm, char **x)
{
+ char **ox = x;
+
if (!incleanup) {
freelinklist(dirstack, freestr);
dirstack = znewlinklist();
while (x && *x)
zaddlinknode(dirstack, ztrdup(*x++));
}
- if (x)
- freearray(x);
+ if (ox)
+ freearray(ox);
}
/**/
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author