zsh-workers
 help / color / mirror / code / Atom feed
* Re: Bug#367823: zsh: segfault when completing arrays
       [not found] <20060518120635.11242.54875.reportbug@fsst.voodoo.lan>
@ 2006-05-18 13:12 ` Clint Adams
  2006-05-19 10:05   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2006-05-18 13:12 UTC (permalink / raw)
  To: zsh-workers; +Cc: Frank Terbeck, 367823-forwarded

> Howdy.
> zsh 4.3.2 crashes with sig11 when doing the following:
> 
> [snip]
> % zsh -f
> % autoload compinit; compinit
> % array=( 5 4 3 2 1 )
> % print $array[4]
>                 ^- place your cursor here and hit <TAB>
> [snap]
> 
> I've tested this on a sarge system with zsh 4.2.5 and that version is
> not affected by this problem.

Should zlemetaline be 0 or should zleline + zlemetacs be non-zero?

#0  0xa7dab425 in memcpy () from /lib/tls/i686/cmov/libc.so.6
#1  0x080a5b5f in dupstrpfx (s=0x0, len=14) at ../../Src/string.c:146
#2  0xa7be32b6 in get_rbuffer (pm=0x811a9a8) at ../../../Src/Zle/zle_params.c:303
#3  0x080926b1 in getstrvalue (v=0xafd03d28) at ../../Src/params.c:1565
#4  0x080a9105 in paramsubst (l=0xafd04374, n=<value optimized out>, 
    str=0xafd03de4, qt=1, ssub=4) at ../../Src/subst.c:1730
#5  0x080ab92a in stringsubst (list=0xafd04374, node=0xafd04368, ssub=4, asssub=0)
    at ../../Src/subst.c:137
#6  0x080abafe in prefork (list=0xafd04374, flags=4) at ../../Src/subst.c:74
#7  0x080ac3d4 in singsub (s=0xafd0441c) at ../../Src/subst.c:290
#8  0x08061fab in evalcond (state=0xafd090d8, fromtest=0x0) at ../../Src/cond.c:152
#9  0x08064c78 in execcond (state=0xafd090d8, do_exec=0) at ../../Src/exec.c:3410
#10 0x08063f48 in execsimple (state=0xafd090d8) at ../../Src/exec.c:826
#11 0x0806a372 in execlist (state=0xafd090d8, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:872
#12 0x08085ade in execif (state=0xafd090d8, do_exec=0) at ../../Src/loop.c:505
#13 0x08067d14 in execcmd (state=0xafd090d8, input=0, output=0, how=18, last1=2)
    at ../../Src/exec.c:2523
#14 0x080692fb in execpline2 (state=0xafd090d8, pcode=<value optimized out>, 
    how=18, input=0, output=0, last1=0) at ../../Src/exec.c:1300
#15 0x08069710 in execpline (state=0xafd090d8, slcode=<value optimized out>, 
    how=18, last1=0) at ../../Src/exec.c:1086
#16 0x0806a40e in execlist (state=0xafd090d8, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:892
#17 0x08085a60 in execif (state=0xafd090d8, do_exec=0) at ../../Src/loop.c:520
#18 0x08067d14 in execcmd (state=0xafd090d8, input=0, output=0, how=2, last1=2)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug#367823: zsh: segfault when completing arrays
  2006-05-18 13:12 ` Bug#367823: zsh: segfault when completing arrays Clint Adams
@ 2006-05-19 10:05   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2006-05-19 10:05 UTC (permalink / raw)
  To: zsh-workers, Frank Terbeck, 367823-forwarded

Clint Adams wrote:
> > Howdy.
> > zsh 4.3.2 crashes with sig11 when doing the following:
> > 
> > [snip]
> > % zsh -f
> > % autoload compinit; compinit
> > % array=( 5 4 3 2 1 )
> > % print $array[4]
> >                 ^- place your cursor here and hit <TAB>
> > [snap]
> > 
> > I've tested this on a sarge system with zsh 4.2.5 and that version is
> > not affected by this problem.
> 
> Should zlemetaline be 0 or should zleline + zlemetacs be non-zero?

I suspect it's just a typo...

Index: Src/Zle/zle_params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_params.c,v
retrieving revision 1.28
diff -u -r1.28 zle_params.c
--- Src/Zle/zle_params.c	7 Mar 2006 21:31:43 -0000	1.28
+++ Src/Zle/zle_params.c	19 May 2006 10:04:48 -0000
@@ -300,7 +300,8 @@
 get_rbuffer(UNUSED(Param pm))
 {
     if (zlemetaline != NULL)
-	return dupstrpfx((char *)zleline + zlemetacs, zlemetall - zlemetacs);
+	return dupstrpfx((char *)zlemetaline + zlemetacs,
+			 zlemetall - zlemetacs);
     return zlelineasstring(zleline + zlecs, zlell - zlecs, 0, NULL, NULL, 1);
 }
 

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-19 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20060518120635.11242.54875.reportbug@fsst.voodoo.lan>
2006-05-18 13:12 ` Bug#367823: zsh: segfault when completing arrays Clint Adams
2006-05-19 10:05   ` Peter Stephenson

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).