From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5567 invoked from network); 8 Oct 1999 07:46:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Oct 1999 07:46:26 -0000 Received: (qmail 27839 invoked by alias); 8 Oct 1999 07:46:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8178 Received: (qmail 27832 invoked from network); 8 Oct 1999 07:46:16 -0000 Date: Fri, 8 Oct 1999 03:46:04 -0400 From: Clint Adams To: Bart Schaefer Cc: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: 3.1.6-pws-6: $compstate[unambiguous] could be garbage Message-ID: <19991008034604.A13033@dman.com> References: <991007104018.ZM25846@candle.brasslantern.com> <19991007133016.A4805@dman.com> <991007213658.ZM27471@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0pre3i In-Reply-To: <991007213658.ZM27471@candle.brasslantern.com> > One thing I tried while figuring out what was going on for the patch above > was inserting > > noglob print -l x"${(@kv)^compstate}"x > > immediately before line 92. That would at least tell you which assoc key > has the bad value. Beware, this is long: zsh/2 7 % a2ps --prexnormal_nmatchesx x1x xnmatchesx x1x xrestorex xautox xcontextx xcommandx xvaredx xx xunambiguousx x--pretty-printx xlist_maxx x100x xunambiguous_cursorx x15x xlistx xambiguousx xtotal_matchersx x0x xexactx xacceptx xto_endx xmatchx xlast_promptx xyesx xpattern_insertx xmenux xmatcher_stringx xx xmatcherx x0x xinsertx xmenux tty-print= and then tty-print=xnormal_nmatchesx x0x xnmatchesx x0x xpattern_matchx x*x xrestorex xautox xcontextx xcommandx xvaredx xx xunambiguousx xx xlist_maxx x100x xunambiguous_cursorx x1x xlistx xambiguousx xtotal_matchersx x0x xexactx xacceptx xto_endx xmatchx xlast_promptx xyesx xpattern_insertx xmenux xmatcher_stringx xx xmatcherx x0x xinsertx xmenux and then xnormal_nmatchesx x0x xnmatchesx x0x xpattern_matchx x*x xrestorex xautox xcontextx xcommandx xvaredx xx xunambiguousx xx xlist_maxx x100x xunambiguous_cursorx x1x xlistx xambiguousx xtotal_matchersx x0x xexactx xacceptx xto_endx xmatchx xlast_promptx xyesx xpattern_insertx xmenux xmatcher_stringx xx xmatcherx x0x xinsertx xmenux and then xnormal_nmatchesx x0x xnmatchesx x0x xpattern_matchx x*x xrestorex xautox xcontextx xcommandx xvaredx xx xunambiguousx x0Tu@0Tu@ox <----------------------------- xlist_maxx x100x xunambiguous_cursorx x1x xlistx xambiguousx xtotal_matchersx x0x xexactx xacceptx xto_endx xmatchx xlast_promptx xyesx xpattern_insertx xmenux xmatcher_stringx xx xmatcherx x0x xinsertx xmenux And from gdb a2ps --pre Breakpoint 1, unambig_data (cp=0x0) at zle_tricky.c:7956 7956 zsfree(scache); (gdb) display mnum 1: mnum = 1 (gdb) display unambig_mnum 2: unambig_mnum = -1 (gdb) display ainfo 3: ainfo = 0x8103020 (gdb) display scache 4: scache = 0x0 (gdb) continue Continuing. tty-print= [dozens of s and nothing] And again with breakpoint set to two lines earlier: zsh/2 1 % a2ps --pre Breakpoint 1, unambig_data (cp=0x0) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 3: ainfo = 0x8103020 2: unambig_mnum = -1 1: mnum = 1 (gdb) display scache 4: scache = 0x0 (gdb) (gdb) continue Continuing. Breakpoint 1, unambig_data (cp=0xbfffe6d4) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x823d650 "--pretty-print" 3: ainfo = 0x8103020 2: unambig_mnum = 1 1: mnum = 1 (gdb) continue Continuing. tty-print= [TAB] Breakpoint 1, unambig_data (cp=0x0) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x823d650 "--pretty-print" 3: ainfo = 0x8103038 2: unambig_mnum = -1 1: mnum = 0 (gdb) continue Continuing. Breakpoint 1, unambig_data (cp=0xbfffeba4) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x81232f0 "" 3: ainfo = 0x8103038 2: unambig_mnum = 0 1: mnum = 0 (gdb) continue Continuing. [TAB] Breakpoint 1, unambig_data (cp=0x0) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x81232f0 "" 3: ainfo = 0x8103050 2: unambig_mnum = -1 1: mnum = 0 (gdb) continue Continuing. Breakpoint 1, unambig_data (cp=0xbfffeba4) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x8122f70 "" 3: ainfo = 0x8103050 2: unambig_mnum = 0 1: mnum = 0 (gdb) continue Continuing. Breakpoint 1, unambig_data (cp=0x0) at zle_tricky.c:7954 7954 if (mnum && ainfo) { 4: scache = 0x8122f70 "" 3: ainfo = 0x8103068 2: unambig_mnum = -1 1: mnum = 0 and so on. I now conclude that I have been stupid and failed to install zle.so after patching and that the corruption no longer seems to occur. Nevertheless, --pretty-print still doesn't complete. See next message.