From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28755 invoked by alias); 7 Dec 2009 17:12:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27477 Received: (qmail 18024 invoked from network); 7 Dec 2009 17:12:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.219.220 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=UcAuBAczGzoxRfP23i0hXrCL8NCWQvhjibfGuOzE8xk=; b=C2LdNS/nG1Nms4ZekDFTui1CaIZHoH3EcKDfhzQzdOoWOnq0J5hI9NTpke2Wvep5cG Wc7Vm7Nfaq2X1SW9eoBzhfLP/fO067vLTQDiogSvNeYO0upSFN1nMeB8ufy7Sck01dQI U3VgyXz7/0nPEpqQYV4DTwXCKjuZQbcRfZRQs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=c9GzazEV9pdti/uCeXN/obpTfWfc4S7sdA2lwNrYaRQ5F7gaO+2ufPhzpLpEq/md6B MW0QFUHTuu58qTGlBIx+l2H2WFftFyhjW++lrsY6dq+0dlZk+++0fHkMf7vIpb9xdTDQ eARXeIf7ozfMchAy8EH+0rS/CDwDXrW0C7SYE= MIME-Version: 1.0 In-Reply-To: <091207073954.ZM9818@torch.brasslantern.com> References: <20091207170336.c417efe1.einars@gmail.com> <091207073954.ZM9818@torch.brasslantern.com> Date: Mon, 7 Dec 2009 18:12:34 +0100 Message-ID: <237967ef0912070912u17a7f7bawfd1263be312014a0@mail.gmail.com> Subject: Re: zsh deep freeze (probably autocompletion-related) From: Mikael Magnusson To: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2009/12/7 Bart Schaefer : > On Dec 7, 5:03pm, Einar Lielmanis wrote: > } > } Steps to reproduce: > } > } "rm ./\" [enter] [tab] > } > } zsh freezes hard and cannot be terminated; kill -9 ir required. > > I get a crash rather than a freeze. > > Program received signal SIGSEGV, Segmentation fault. > 0x080bfe09 in chuck (str=3D0xb7d37000 "$\003\001 \020") > at ../../zsh-4.0/Src/utils.c:1795 > 1795 while ((str[0] =3D str[1])) > (gdb) where > #0 0x080bfe09 in chuck (str=3D0xb7d37000 "$\003\001 \020") > at ../../zsh-4.0/Src/utils.c:1795 > #1 0x08131568 in get_comp_string () > at ../../../zsh-4.0/Src/Zle/zle_tricky.c:1259 > #2 0x0812ff58 in docomplete (lst=3D0) > at ../../../zsh-4.0/Src/Zle/zle_tricky.c:659 > #3 0x0812f395 in completeword (args=3D0x816d01c) > at ../../../zsh-4.0/Src/Zle/zle_tricky.c:232 > #4 0x0812f2b9 in completecall (args=3D0x816d01c) > at ../../../zsh-4.0/Src/Zle/zle_tricky.c:208 > #5 0x08121bbc in execzlefunc (func=3D0x815b3f0, args=3D0x816d01c, set_bi= ndk=3D0) > at ../../../zsh-4.0/Src/Zle/zle_main.c:1312 > #6 0x08121263 in zlecore () at ../../../zsh-4.0/Src/Zle/zle_main.c:1050 > #7 0x08121817 in zleread (lp=3D0x816ddc8, rp=3D0x0, flags=3D3, context= =3D1) > at ../../../zsh-4.0/Src/Zle/zle_main.c:1213 > #8 0x081235a8 in zle_main_entry (cmd=3D1, ap=3D0xbfeee6e4 "\221=C3=A1C") > at ../../../zsh-4.0/Src/Zle/zle_main.c:1866 > #9 0x0807df9c in zleentry (cmd=3D1) at ../../zsh-4.0/Src/init.c:1305 > #10 0x0807e7c7 in inputline () at ../../zsh-4.0/Src/input.c:278 > > (gdb) up > #1 0x08131568 in get_comp_string () > at ../../../zsh-4.0/Src/Zle/zle_tricky.c:1259 > 1259 chuck(tt + zlemetacs - wb - qsub); > (gdb) p tt > $3 =3D 0xb7d33898 "./x" > (gdb) p zlemetacs > $4 =3D 7 > (gdb) p wb > $5 =3D 3 > (gdb) p qsub > $6 =3D 0 > > Looks like zlemetacs is too large. I get a loop, so i pressed ctrl-c Program received signal SIGINT, Interrupt. mb_metacharinit () at utils.c:449 (gdb) bt #0 mb_metacharinit () at utils.c:449 #1 0x080cee63 in itype_end (ptr=3D0x819bde2 "", itype=3D128, once=3D1) at utils.c:3312 #2 0x6f92bf00 in get_comp_string () at zle_tricky.c:1450 #3 0x6f929784 in docomplete (lst=3D4) at zle_tricky.c:659 #4 0x6f928c27 in expandorcomplete (args=3D0x6f93ed60) at zle_tricky.c:315 #5 0x6f9287ca in completecall (args=3D0x6f93ed60) at zle_tricky.c:208 #6 0x6f9181a8 in execzlefunc (func=3D0x6f93cd40, args=3D0x6f93ed60, set_bi= ndk=3D0) at zle_main.c:1312 #7 0x6f917613 in zlecore () at zle_main.c:1050 #8 0x6f917d45 in zleread (lp=3D0x80efb58, rp=3D0x0, flags=3D3, context=3D1= ) at zle_main.c:1213 #9 0x6f919e93 in zle_main_entry (cmd=3D1, ap=3D0x77ffe3f4 "\016") at zle_main.c:1866 #10 0x08086fc6 in zleentry (cmd=3D1) at init.c:1304 #11 0x08087889 in inputline () at input.c:278 #12 0x080876f8 in ingetc () at input.c:214 #13 0x0807d881 in ihgetc () at hist.c:263 #14 0x08090743 in gettokstr (c=3D10, sub=3D0) at lex.c:1245 #15 0x0808fefa in gettok () at lex.c:929 #16 0x0808edf4 in zshlex () at lex.c:364 #17 0x080ad75a in par_simple (complex=3D0x77ffe720, nr=3D0) at parse.c:1661 #18 0x080ab887 in par_cmd (complex=3D0x77ffe720) at parse.c:879 #19 0x080ab354 in par_pline (complex=3D0x77ffe720) at parse.c:728 #20 0x080ab304 in par_sublist2 (complex=3D0x77ffe720) at parse.c:709 #21 0x080ab16e in par_sublist (complex=3D0x77ffe758) at parse.c:664 #22 0x080aabc7 in par_event () at parse.c:477 #23 0x080aab3e in parse_event () at parse.c:454 #24 0x080844f5 in loop (toplevel=3D1, justonce=3D0) at init.c:132 #25 0x0808733f in zsh_main (argc=3D2, argv=3D0x77ffe8b4) at init.c:1454 #26 0x080553d6 in main (argc=3DCannot access memory at address 0x0 (gdb) bt full 3 #0 mb_metacharinit () at utils.c:449 No locals. #1 0x080cee63 in itype_end (ptr=3D0x819bde2 "", itype=3D128, once=3D1) at utils.c:3312 No locals. #2 0x6f92bf00 in get_comp_string () at zle_tricky.c:1450 nclen =3D 0 nnb =3D 0x819bde2 "" nb =3D 0x0 ne =3D 0x0 t0 =3D 34 tt0 =3D 34 i =3D 0 j =3D 0 k =3D 0 cp =3D 0 rd =3D 0 sl =3D 3 ocs =3D 2013257460 ins =3D 0 oins =3D 0 ia =3D 0 parct =3D 0 varq =3D 0 ona =3D 0 qsub =3D 0 zlemetacs_qsub =3D 9 redirpos =3D 0 s =3D 0x819bde0 "./" tmp =3D 0x817c648 "echo ./\\\n" p =3D 0x0 tt =3D 0x819bde2 "" ---Type to continue, or q to quit--- rdop =3D "\000\066\220o\350\336\377w<\032\000p\005\000\000\000\200\= 065\020\b" linptr =3D 0x6ffd6860 "echo ./\\\nx" u =3D 0x817c651 "" and stepping forward a bit, all the counters used for +=3D things are 0, since tt is just an empty string. 3313 while (*ptr) { (gdb) 3378 return (char *)ptr; (gdb) 3379 } (gdb) get_comp_string () at zle_tricky.c:1451 1451 nnb =3D tt + nclen; (gdb) 1452 tt +=3D nclen; (gdb) print nclen $2 =3D 0 --=20 Mikael Magnusson