From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1348 invoked from network); 16 Aug 2005 01:37:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Aug 2005 01:37:55 -0000 Received: (qmail 37385 invoked from network); 16 Aug 2005 01:37:49 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 01:37:49 -0000 Received: (qmail 22901 invoked by alias); 16 Aug 2005 01:37:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21632 Received: (qmail 22891 invoked from network); 16 Aug 2005 01:37:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Aug 2005 01:37:44 -0000 Received: (qmail 37088 invoked from network); 16 Aug 2005 01:37:44 -0000 Received: from zproxy.gmail.com (64.233.162.193) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 01:37:39 -0000 Received: by zproxy.gmail.com with SMTP id i11so824849nzh for ; Mon, 15 Aug 2005 18:37:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DB5EUngNiYfPMIumSwHbFvm/OUUCEwI2vz5rINIYIb5ud0XppKEP+/rkfJjMzMVLXPOZCAw+GTEwW5QyujtttG+JvLur0dui4L/PkPMxSOSzbc3brzDF7agf763VgU6+MfBU0SbeOLOWyPa7A585+54lc4nmupg/uADCY4qO0KU= Received: by 10.37.20.70 with SMTP id x70mr1426707nzi; Mon, 15 Aug 2005 18:37:37 -0700 (PDT) Received: by 10.36.20.10 with HTTP; Mon, 15 Aug 2005 18:37:37 -0700 (PDT) Message-ID: <237967ef05081518376385563e@mail.gmail.com> Date: Tue, 16 Aug 2005 03:37:37 +0200 From: Mikael Magnusson To: zsh-workers Subject: crash in completing code with unicode support Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RCVD_BY_IP autolearn=ham version=3.0.4 I tried the recent developments with unicode support, and it's going pretty well. I can write text in zle without it showing up as ^{saa'*^+{^ instaed of actual text. Backspacing over doublewidth characters only steps back one cell, but i understand this has not been worked on yet. One problem i have encountered though, is if i have a couple file that starts with the same multibyte character (it seems to be important that it is at the very beginning of the name), and then different endings, zsh crashes when i try to tabcomplete them. An obvious case where this happens is tabcompleting mp3 files where the artist's name starts with =D8 (a danish capital O with a / through it, any of =E5=E4=F6=E6=F8=C5=C4=D6=C6=D8 seems to do the same thin= g too). The simplest testcase i could find is to create an empty directory, and in it creaty two files, =D8a and =D8b. Just typing ls gives ls =D8, and the second crashes zsh (backtrace at the end of mail). Zsh crashes both if in a singlebyte locale and a doublebyte locale, the important thing is the actual filename is utf-8. backtrace: % touch =D8a % touch =D8b % ls =D8a =D8b % ls =D8 Program received signal SIGSEGV, Segmentation fault. ztrsub (t=3D0x82badca "", s=3D0x82d6000
) at utils.c:3059 3059=09=09if (*s++ =3D=3D Meta) { (gdb) bt #0 ztrsub (t=3D0x82badca "", s=3D0x82d6000
) at utils.c:3059 #1 0x080c42a4 in pattryrefs (prog=3D0x82bb738, string=3D0x82badc8 "=C3\203", stringlen=3D2, unmetalen=3D-1, patoffset=3D0, nump=3D0x0, begp=3D0x0, endp=3D0x0) at pattern.c:1586 #2 0x080c4548 in pattry (prog=3D0x0, string=3D0x0) at pattern.c:1511 #3 0xa7d11f96 in do_comp_vars (test=3D184, na=3D1, sa=3D0xa7a27970 "\213", nb=3D137080266, sb=3D0xa7a27970 "\213", mod=3D1) at complete.c:831 #4 0xa7d12334 in bin_compset (name=3D0xa7a27970 "\213", argv=3D0xffffffe5, ops=3D0xaffee090, func=3D0) at complete.c:969 #5 0x08052fb4 in execbuiltin (args=3D0xaffee090, bn=3D0xa7d29ba4) at built= in.c:439 #6 0x0807054e in execcmd (state=3D0xafffddf0, input=3D0, output=3D0, how=3D18, last1=3D2) at exec.c:2558 #7 0x08070e65 in execpline2 (state=3D0xafffddf0, pcode=3D0, how=3D18, input=3D0, output=3D0, last1=3D0) at exec.c:1289 #8 0x08071433 in execpline (state=3D0xafffddf0, slcode=3D137191424, how=3D18, last1=3D0) at exec.c:1075 #9 0x08072da3 in execlist (state=3D0xafffddf0, dont_change_job=3D1, exiting=3D0) at exec.c:881 #10 0x08099440 in execif (state=3D0xafffddf0, do_exec=3D0) at loop.c:505 #11 0x0806f070 in execcmd (state=3D0xafffddf0, input=3D0, output=3D0, how=3D18, last1=3D2) at exec.c:2505 #12 0x08070e65 in execpline2 (state=3D0xafffddf0, pcode=3D0, how=3D18, input=3D0, output=3D0, last1=3D0) at exec.c:1289 #13 0x08071433 in execpline (state=3D0xafffddf0, slcode=3D137191424, how=3D18, last1=3D0) at exec.c:1075 #14 0x08072da3 in execlist (state=3D0xafffddf0, dont_change_job=3D1, exiting=3D0) at exec.c:881 #15 0x080994e5 in execif (state=3D0xafffddf0, do_exec=3D0) at loop.c:520 #16 0x0806f070 in execcmd (state=3D0xafffddf0, input=3D0, output=3D0, how= =3D2, last1=3D2) at exec.c:2505 #17 0x08070e65 in execpline2 (state=3D0xafffddf0, pcode=3D0, how=3D2, input=3D0, output=3D0, last1=3D0) at exec.c:1289 #18 0x08071433 in execpline (state=3D0xafffddf0, slcode=3D137191424, how=3D2, last1=3D0) at exec.c:1075 #19 0x08072da3 in execlist (state=3D0xafffddf0, dont_change_job=3D1, exiting=3D0) at exec.c:881 #20 0x0807308a in runshfunc (prog=3D0x82b71d0, wrap=3D0x82b71d0, name=3D0xa7a26030 "_main_complete") at exec.c:781 #21 0xa7d12d7a in comp_wrapper (prog=3D0x0, w=3D0x0, name=3D0x0) at complet= e.c:1328 #22 0x08073482 in doshfunc (name=3D0x81451f0 "_main_complete", prog=3D0x82b71d0, doshargs=3D0xa7a26030, flags=3D0, noreturnval=3D0) at exec.c:3823 #23 0xa7d1a866 in makecomplist (s=3D0x82bc0b0 "=C3\203=B8", incmd=3D0, lst= =3D0) at compcore.c:818 #24 0xa7d1b918 in do_completion (dummy=3D0xa7d66e74, dat=3D0x82d6000) at compcore.c:347 #25 0xa7d58604 in docomplete (lst=3D0) at zle_tricky.c:1899 #26 0xa7d59bbf in completeword (args=3D0x0) at zle_tricky.c:232 #27 0xa7d540b9 in completecall (args=3D0x82d6000) at zle_tricky.c:208 #28 0xa7d475c5 in execzlefunc (func=3D0xa7d64330, args=3D0xa7d6715c) at zle_main.c:1063 #29 0xa7d47938 in zlecore () at zle_main.c:838 #30 0xa7d483bd in zleread (lp=3D0x8101b10, rp=3D0x0, flags=3D0, context=3D0= ) at zle_main.c:992 #31 0x0808a054 in inputline () at input.c:278 #32 0x0808a69a in ingetc () at input.c:214 #33 0x08080bc7 in ihgetc () at hist.c:240 #34 0x08096076 in gettok () at lex.c:628 #35 0x08097d36 in yylex () at lex.c:344 #36 0x080b9dfa in parse_event () at parse.c:451 #37 0x08086eea in loop (toplevel=3D1, justonce=3D0) at init.c:128 #38 0x08089c04 in zsh_main (argc=3D1, argv=3D0xafffebd4) at init.c:1315 #39 0x0805292e in main (argc=3D0, argv=3D0x0) at main.c:93 --=20 Mikael Magnusson