From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6770 invoked by alias); 23 Feb 2011 10:57:54 -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: 28796 Received: (qmail 5001 invoked from network); 23 Feb 2011 10:57:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at michael-prokop.at does not designate permitted sender hosts) Date: Wed, 23 Feb 2011 11:50:18 +0100 From: Michael Prokop To: zsh-workers@zsh.org Cc: Sebastien Desreux , 353863@bugs.debian.org Subject: Bugreport: completion hanging at ubo - endless loop Message-ID: <2011-02-23T11-33-06@devnull.michael-prokop.at> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LiQwW4YX+w4axhAx" Content-Disposition: inline X-URL: http://michael-prokop.at/ X-GPG-Key-ID: 0x37E272E8 X-GPG-Key: http://www.michael-prokop.at/gpg X-GPG-Fingerprint: 04AE E62C 9502 CD34 A7DA 857B D8DF 53FB 37E2 72E8 User-Agent: Mutt/1.5.18 (2008-05-17) --LiQwW4YX+w4axhAx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D353863 Sebastien Desreux reported a bug about zsh with its completion system in a specific situation. To trigger the bug (at least 4.3.10 and 4.3.11 in Debian are known to be affected by this bug): zsh -f autoload -Uz compinit; compinit; alias ubox=3Dls ubo Then the zsh process is hanging in an endless loop, eating CPU. I've just stepped down the problem in gdb, it seems to be hanging in this code forever (I've extracted the relevant parts that repeat-and-repeat-again out of my gdb session, hope this helps): ,---- [ gdb session - the relevant parts / the endless loop ] | get_comp_string (lst=3D4) at ../../../Src/Zle/zle_tricky.c:1487 | nnb =3D tt + nclen; | nnb =3D tt + nclen; | for (tt =3D s; tt < s + zlemetacs_qsub - wb;) { | if (*tt =3D=3D Inbrack) { | } else if (i && *tt =3D=3D Outbrack) { | int nclen =3D MB_METACHARLEN(tt); | mb_metacharlenconv (s=3D0x23aaf32 "", wcp=3D0x0) at ../../Src/utils.c:4439 | if (!isset(MULTIBYTE)) { | if (itok(*s)) { | return mb_metacharlenconv_r(s, wcp, &mb_shiftstate); | mb_metacharlenconv_r (s=3D0x23aaf32 "", wcp=3D0x0, mbsp=3D0x6b1f30) at ..= /../Src/utils.c:4389 | { | ret =3D mbrtowc(&wc, &inchar, 1, mbsp); | { | for (ptr =3D s; *ptr; ) { | if (wcp) | if (ptr > s) { | memset(mbsp, 0, sizeof(*mbsp)); | if (ptr > s) { | } | get_comp_string (lst=3D4) at ../../../Src/Zle/zle_tricky.c:1486 | if (itype_end(tt, IIDENT, 1) =3D=3D tt) | int nclen =3D MB_METACHARLEN(tt); | if (itype_end(tt, IIDENT, 1) =3D=3D tt) | itype_end (ptr=3D0x23aaf32 "", itype=3D128, once=3D1) at ../../Src/utils.= c:3491 | { | if (isset(MULTIBYTE) && | (itype !=3D IIDENT || !isset(POSIXIDENTIFIERS))) { | mb_metacharinit(); | mb_metacharinit () at ../../Src/utils.c:449 | memset(&mb_shiftstate, 0, sizeof(mb_shiftstate)); | mb_metacharinit () at ../../Src/utils.c:450 | } | itype_end (ptr=3D0x23aaf32 "", itype=3D128, once=3D1) at ../../Src/utils.= c:3498 | int len =3D mb_metacharlenconv(ptr, &wc); | while (*ptr) { | } `---- regards, -mika- --=20 http://michael-prokop.at/ || http://adminzen.org/ http://grml-solutions.com/ || http://grml.org/ --LiQwW4YX+w4axhAx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAk1k5moACgkQ2N9T+zficugU0wCaAox8R8Mmn1xdRBpkVfURhRLS mskAn2uMjTE/9JiSaIe70NksHuNhofFW =kcxJ -----END PGP SIGNATURE----- --LiQwW4YX+w4axhAx--