* BUG: "unset pipestatus" coredump
@ 2001-04-06 6:43 Geoff Wing
2001-04-06 7:48 ` Sven Wischnowsky
0 siblings, 1 reply; 2+ messages in thread
From: Geoff Wing @ 2001-04-06 6:43 UTC (permalink / raw)
To: zsh-workers
(gdb) run -f
% unset pipestatus
Program received signal SIGSEGV, Segmentation fault.
0x480ad914 in pipestatsetfn (pm=0x480d45a0, x=0x0) at params.c:2878
2878 for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
(gdb) bt
#0 0x480ad914 in pipestatsetfn (pm=0x480d45a0, x=0x0) at params.c:2878
#1 0x480ac8e9 in stdunsetfn (pm=0x480d45a0, exp=1) at params.c:2126
#2 0x480ac7bb in unsetparam_pm (pm=0x480d45a0, altflag=0, exp=1)
at params.c:2063
#3 0x4807951a in bin_unset (name=0x805dcc0 "unset", argv=0xbfbfd3bc,
ops=0xbfbfd404 "", func=0) at builtin.c:2348
#4 0x4807428b in execbuiltin (args=0x805dca0, bn=0x480d2424) at builtin.c:367
#5 0x48083ae0 in execcmd (state=0xbfbfd6a8, input=0, output=0, how=18,
last1=2) at exec.c:2284
#6 0x480812a1 in execpline2 (state=0xbfbfd6a8, pcode=131, how=18, input=0,
output=0, last1=0) at exec.c:1189
#7 0x480809e1 in execpline (state=0xbfbfd6a8, slcode=4098, how=18, last1=0)
at exec.c:982
#8 0x48080434 in execlist (state=0xbfbfd6a8, dont_change_job=0, exiting=0)
at exec.c:826
#9 0x480801bc in execode (p=0x805dc50, dont_change_job=0, exiting=0)
at exec.c:729
#10 0x48092ce0 in loop (toplevel=1, justonce=0) at init.c:152
#11 0x480951e6 in zsh_main (argc=2, argv=0xbfbfd764) at init.c:1201
#12 0x8048836 in main (argc=2, argv=0xbfbfd764) at ./main.c:37
#13 0x80485e1 in ___start ()
(gdb)
Regards,
--
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff : <gcw@zsh.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG: "unset pipestatus" coredump
2001-04-06 6:43 BUG: "unset pipestatus" coredump Geoff Wing
@ 2001-04-06 7:48 ` Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2001-04-06 7:48 UTC (permalink / raw)
To: zsh-workers
Geoff Wing wrote:
> (gdb) run -f
> % unset pipestatus
>
> Program received signal SIGSEGV, Segmentation fault.
Yes, better test if we really get an array.
Bye
Sven
Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.34
diff -u -r1.34 params.c
--- Src/params.c 2001/04/06 07:38:36 1.34
+++ Src/params.c 2001/04/06 07:46:50
@@ -2873,11 +2873,15 @@
static void
pipestatsetfn(Param pm, char **x)
{
- int i;
+ if (x) {
+ int i;
- for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
- pipestats[i] = atoi(*x);
- numpipestats = i;
+ for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
+ pipestats[i] = atoi(*x);
+ numpipestats = i;
+ }
+ else
+ numpipestats = 0;
}
/**/
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-06 7:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-06 6:43 BUG: "unset pipestatus" coredump Geoff Wing
2001-04-06 7:48 ` Sven Wischnowsky
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).