Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report: segfault when pasting (function and alias names collide)
- X-seq: zsh-workers 40280
- From: Victor Volle <victor.volle@xxxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: Bug report: segfault when pasting (function and alias names collide)
- Date: Fri, 6 Jan 2017 13:26:30 +0100
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beta-thoughts.org; s=beta-thoughts; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NAW7fvpfk6VHuyXnw4jlKvbDENLmQxiBSWjwYVunLDk=; b=MU39Gg+cqhf/oJRKkx67OBlMXwYiaP39F6zmow0oihPD5spSIUaP+DdePe1MbRn5MH ifc9CVm+tvELRN5jdiedsZMN7vml+et0d0x2K+acxWG/YP8YJF0Ape3OQaqeXcFf/KgE rOhSXKyb0KgTzjP8qqDK5B6CuajsntNBfJmRU=
- In-reply-to: <20170106022907.GA6982@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAA9FWwOMDftD+nfj=Thw-SO9ZpHD-eg4kOZYTzzTHDRcTeDqxw@mail.gmail.com> <20170106022907.GA6982@fujitsu.shahaf.local2>
I tried to reduce it as far as possible, but it does not happen without
oh-my-zsh.
This is the minimal version that still shows the segfault:
source $ZSH/oh-my-zsh.sh
alias h='history'
h() {
echo "foo"
}
Steps to reproduce:
0) install latest oh-my-zsh
1) Invoke `zsh -f`
2) source the above script
3) paste anything
On Fri, Jan 6, 2017 at 3:29 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
wrote:
> Victor Volle wrote on Thu, Jan 05, 2017 at 17:21:03 +0100:
> > I think this may already have been reported in 2010:
> > https://www.zsh.org/mla/workers/2010/msg00521.html
> > but it does not seem to be fixed.
>
> The part with function and alias has not been "fixed" because it's not
> a bug. To define a function without interpreting aliases in the
> function name, use this syntax:
>
> function f {
> ⋮
> }
>
> > If the redefinition is problematic, would it be possible to trigger an
> > error, when the function
> > is defined? A segfault when pasting seems to be quite bad.
>
> All segfaults are bug, but how do you reproduce this one? I did:
>
> $ zsh -f
> % history() {
> ⋮ copied the function body from your mail
> }
> % <paste>
>
> and it did not segfault. Can you provide a minimal reproduction script
> starting from `zsh -f`? (and without third party modules, if at all
> possible)
>
> Thanks,
>
> Daniel
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author