zsh-workers
 help / color / mirror / code / Atom feed
From: Felix Rosencrantz <f_rosencrantz@yahoo.com>
To: zsh-workers@sunsite.dk
Subject: Seg Fault in paramsubst()
Date: Mon, 27 Aug 2001 23:24:06 -0700 (PDT)	[thread overview]
Message-ID: <20010828062406.54685.qmail@web10405.mail.yahoo.com> (raw)
In-Reply-To: <1010824170526.ZM28196@candle.brasslantern.com>

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/


  parent reply	other threads:[~2001-08-28  6:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-24  6:54 Working with the historywords special parameter Felix Rosencrantz
2001-08-24  8:16 ` Sven Wischnowsky
2001-08-24 17:05   ` Bart Schaefer
2001-08-28  6:19     ` Felix Rosencrantz
2001-08-28 15:16       ` Bart Schaefer
2001-08-28  6:24     ` Felix Rosencrantz [this message]
2001-08-28  8:35       ` PATCH: Re: Seg Fault in paramsubst() Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010828062406.54685.qmail@web10405.mail.yahoo.com \
    --to=f_rosencrantz@yahoo.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).