From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5089 invoked from network); 24 Feb 2000 00:34:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Feb 2000 00:34:40 -0000 Received: (qmail 469 invoked by alias); 24 Feb 2000 00:34:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9851 Received: (qmail 459 invoked from network); 24 Feb 2000 00:34:32 -0000 Message-ID: <14516.31889.777264.838702@phl.itasoftware.com> Date: Wed, 23 Feb 2000 19:34:25 -0500 (EST) From: greg@itasoftware.com (Greg Klanderman) To: zsh-workers@sunsite.auc.dk (Zsh list) Subject: segfault in 3.1.6 in completion Reply-To: greg@itasoftware.com X-Mailer: VM 6.62 under 21.0 "Pyrenean" XEmacs Lucid (beta62) Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII Please copy me in any replies. Start 3.1.6 with no init files and load the below attached completion functions. Now if you go into a directory containing CVS controlled files and try % cvstest foobar/ (where foobar is some directory) and hit TAB you get a crash Program received signal SIGSEGV, Segmentation fault. #0 0x809fc6d in makecomplistflags () #1 0x809d53b in makecomplistlist () #2 0x809d4bf in makecomplistor () #3 0x809d43a in makecomplistcc () #4 0x809d362 in makecomplistcmd () #5 0x809d1e1 in makecomplistglobal () #6 0x809bea3 in makecomplist () #7 0x809abb8 in docompletion () #8 0x80949f3 in docomplete () #9 0x809398e in expandorcomplete () #10 0x808d67c in execzlefunc () #11 0x808d3d6 in zleread () #12 0x8063e7d in inputline () #13 0x8063dc5 in ingetc () #14 0x805f6a9 in ihgetc () #15 0x80674e7 in gettok () #16 0x8066ffe in yylex () #17 0x8071d3c in parse_event () #18 0x8062601 in loop () #19 0x804a73a in main () Unfortunately I didn't build with debugging on and don't have time right now. Figured I'd send this first just in case it's already been fixed.. If there is no directory (ie complete file in current directory), or if you disable the "-y _cvscompletions", it works fine. thanks, Greg # mostly stolen from the zsh distribution compctl -/K _cvstargets -y _cvscompletions cvstest _cvsprefix () { local nword args f read -nc nword; read -Ac args pref=$args[$nword] if [[ -d $pref:h && ! -d $pref ]]; then pref=$pref:h elif [[ $pref != */* ]]; then pref= fi [[ -n "$pref" && "$pref" != */ ]] && pref=$pref/ } _cvsentries () { setopt localoptions nullglob unset if [[ -f ${pref}CVS/Entries ]]; then reply=( "${pref}${^${(@)${(@)${(@)${(f@)$(<${pref}CVS/Entries)}:#D*}#/}%%/*}[@]}" ) fi } _cvscompletions () { setopt localoptions noksharrays local c cc reply=( ) for c in $@ ; do cc="${c##*/}" [[ -d "$c" ]] && cc="$cc/" reply=( $reply[@] $cc ) done } _cvstargets () { setopt localoptions noksharrays local pref _cvsprefix _cvsentries }