From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3607 invoked from network); 17 Jun 2005 18:29:05 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Jun 2005 18:29:05 -0000 Received: (qmail 9511 invoked from network); 17 Jun 2005 18:28:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2005 18:28:59 -0000 Received: (qmail 17272 invoked by alias); 17 Jun 2005 18:28:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21358 Received: (qmail 17262 invoked from network); 17 Jun 2005 18:28:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 Jun 2005 18:28:55 -0000 Received: (qmail 9298 invoked from network); 17 Jun 2005 18:28:55 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 17 Jun 2005 18:28:51 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id C845070046; Fri, 17 Jun 2005 14:28:49 -0400 (EDT) Date: Fri, 17 Jun 2005 14:28:49 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Cc: "Frode E. Moe" , Debian Bug Tracking System <314597-forwarded@bugs.debian.org> Subject: Re: Bug#314597: zsh segfaults randomly when tabcompleting file with lots of spaces Message-ID: <20050617182849.GA1759@scowler.net> Mail-Followup-To: zsh-workers@sunsite.dk, "Frode E. Moe" , Debian Bug Tracking System <314597-forwarded@bugs.debian.org> References: <20050617110002.C4AF22B47A@nexus.intra.coretrek.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050617110002.C4AF22B47A@nexus.intra.coretrek.com> User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 I have not yet been able to reproduce this. > Hi, while dealing with a virus attachment to an email I received, zsh > segfaulted while tabcompleting the file name. > > The file name is: > instructions.htm .scr > > (i.e. "instructions.htm" + a lot of spaces + ".scr", obviously an > attempt to trick windows users into running an executable). > > I haven't found a way to reproduce this every time, but the following > seems to trigger a segfault after a few iterations: > > touch instructions.htm\ \ \ \ \ \ ........lots of spaces ....\ \.scr > mkdir k > mv ins k > mv ins k > strings ins > > Here's a gdb 'bt' backtrace from when the bug occurs: > > (gdb) bt > #0 0xb7e9c33b in strlen () from /lib/tls/libc.so.6 > #1 0xb7c4837d in unambig_data () from > /usr/lib/zsh/4.2.5/zsh/complete.so > #2 0xb7c48e76 in do_single () from /usr/lib/zsh/4.2.5/zsh/complete.so > #3 0xb7c4989c in do_menucmp () from /usr/lib/zsh/4.2.5/zsh/complete.so > #4 0xb7beb702 in ?? () from /usr/lib/zsh/4.2.5/zsh/complist.so > #5 0x00000000 in ?? () > #6 0x00000000 in ?? () > #7 0x0000000a in ?? () > #8 0x00000000 in ?? () > #9 0xb7e95dcb in free () from /lib/tls/libc.so.6 > #10 0x0808833a in runhookdef () > #11 0xb7c3b020 in after_complete () from > /usr/lib/zsh/4.2.5/zsh/complete.so > #12 0x0808837e in runhookdef () > #13 0xb7c6ce02 in parambeg () from /usr/lib/zsh/4.2.5/zsh/zle.so > #14 0xb7c6c27b in expandorcomplete () from /usr/lib/zsh/4.2.5/zsh/zle.so > #15 0xb7c6bebd in completecall () from /usr/lib/zsh/4.2.5/zsh/zle.so > #16 0xb7c61587 in execzlefunc () from /usr/lib/zsh/4.2.5/zsh/zle.so > #17 0xb7c60c37 in zlecore () from /usr/lib/zsh/4.2.5/zsh/zle.so > #18 0xb7c611df in zleread () from /usr/lib/zsh/4.2.5/zsh/zle.so > #19 0x08077ea2 in ingetc () > #20 0x08077c61 in ingetc () > #21 0x080701ce in iaddtoline () > #22 0x0807d776 in gettok () > ---Type to continue, or q to quit--- > #23 0x0807d165 in yylex () > #24 0x08090f27 in parse_event () > #25 0x0807500a in loop () > #26 0x08077962 in zsh_main () > #27 0x0805268b in main () > > Here's some of the .zshrc options I use: > > setopt menucomplete > setopt autolist > autoload -U compinit > compinit > zmodload -i zsh/complist > zstyle ':completion:*' menu select=0 > zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} >