From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26707 invoked from network); 28 Aug 2001 06:24:18 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Aug 2001 06:24:18 -0000 Received: (qmail 26868 invoked by alias); 28 Aug 2001 06:24:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15716 Received: (qmail 26853 invoked from network); 28 Aug 2001 06:24:08 -0000 Message-ID: <20010828062406.54685.qmail@web10405.mail.yahoo.com> Date: Mon, 27 Aug 2001 23:24:06 -0700 (PDT) From: Felix Rosencrantz Subject: Seg Fault in paramsubst() To: zsh-workers@sunsite.dk In-Reply-To: <1010824170526.ZM28196@candle.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii When using this in my completer I would sometimes get seg faults. Below is a stack trace from gdb. I think this stack trace would only occur if there were either no matches or just one. Though it might just happen in one of those situations. > local w p h r > w=${(q)words[CURRENT-1]} > p=$'\0'$w$'\0' > h=$'\0'${(pj:\0:)${(z)history[(R)*$w*]}} > r=( ${${(ps:\1:)h//$~p/$'\1'}%%$'\0'*} ) > compadd -a r > -FR #0 0x80b472e in paramsubst (l=0xbfffbe88, n=0xbfffbe70, str=0xbfffbc58, qt=0, ssub=0) at subst.c:1836 #1 0x80af2ec in stringsubst (list=0xbfffbe88, node=0xbfffbe70, ssub=0, asssub=0) at subst.c:130 #2 0x80aec7f in prefork (list=0xbfffbe88, flags=0) at subst.c:74 #3 0x80af82f in multsub (s=0xbfffc108, a=0xbfffc104, isarr=0xbfffc12c, sep=0x0) at subst.c:282 #4 0x80b216d in paramsubst (l=0xbfffc3f0, n=0xbfffc3e0, str=0xbfffc1b8, qt=0, ssub=4) at subst.c:1065 #5 0x80af2ec in stringsubst (list=0xbfffc3f0, node=0xbfffc3e0, ssub=4, asssub=0) at subst.c:130 #6 0x80aec7f in prefork (list=0xbfffc3f0, flags=6) at subst.c:74 #7 0x8065b6e in addvars (state=0xbfffc4d0, pc=0x8139d5c, export=0) at exec.c:1516 #8 0x8063a5e in execsimple (state=0xbfffc4d0) at exec.c:753 #9 0x8063bc8 in execlist (state=0xbfffc4d0, dont_change_job=1, exiting=0) at exec.c:806 #10 0x80639c8 in execode (p=0x8139a68, dont_change_job=1, exiting=0) at exec.c:729 #11 0x806b388 in runshfunc (prog=0x8139a68, wrap=0x0, name=0x40249b40 "_history_prev_word") at exec.c:3461 #12 0x401cd80f in comp_wrapper (prog=0x8139a68, w=0x0, name=0x40249b40 "_history_prev_word") at complete.c:1271 __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/