* Re: dirstack=(/) dumps core
@ 2000-02-29 16:09 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-02-29 16:09 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* dirstack=(/) dumps core
@ 2000-02-29 15:10 Tanaka Akira
0 siblings, 0 replies; 2+ messages in thread
From: Tanaka Akira @ 2000-02-29 15:10 UTC (permalink / raw)
To: zsh-workers
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%
(gdb) where
#0 0x400de9cc in free () from /lib/libc.so.6
#1 0x400de97d in free () from /lib/libc.so.6
#2 0x80a3abd in freearray (s=0x80d6954) at utils.c:1958
#3 0x401e24f3 in dirssetfn (pm=0x80d7550, x=0x80d6954) at parameter.c:977
#4 0x8089022 in setarrvalue (v=0xbffff948, val=0x80d6950) at params.c:1583
#5 0x80897bd in setaparam (s=0x400146d4 "", val=0x80d6950) at params.c:1782
#6 0x805fcd0 in addvars (state=0xbffffa3c, pc=0x400146b8, export=0) at exec.c:1531
#7 0x805daac in execsimple (state=0xbffffa3c) at exec.c:741
#8 0x805dc2d in execlist (state=0xbffffa3c, dont_change_job=0, exiting=0) at exec.c:792
#9 0x805da3b in execode (p=0x40014690, dont_change_job=0, exiting=0) at exec.c:721
#10 0x807192a in loop (toplevel=1, justonce=0) at init.c:144
#11 0x8051371 in main (argc=2, argv=0xbffffb04) at ./main.c:86
--
Tanaka Akira
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-02-29 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-29 16:09 dirstack=(/) dumps core Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
2000-02-29 15:10 Tanaka Akira
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).