Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh parser segmentation fault in strcatsub



Peter Stephenson wrote on Tue, May 16, 2017 at 09:47:23 +0100:
> On Mon, 15 May 2017 17:48:07 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > On Mon, May 15, 2017 at 2:30 PM, Eduardo Bustamante <dualbus@xxxxxxxxx> wrote:
> > >
> > > Core was generated by `/home/dualbus/src/zsh/zsh/Src/zsh -nv strcatsub'.
> > 
> > I can't reproduce this with any of "zsh -f", "zsh -nf", or "zsh -nvf"
> > when using the latest checkout from git and the file you attached.
> > Valgrind reports no problems.
> 
> It's possible it's a variant of the previous string handling problem in
> patterns, (41096 / 4bb81eef) which had murky effects.

Building a tree newer than that revision (171e7fa4c1d9 + some local
patches that don't go anywhere near the parser), I get:

[[[
% /path/to/installed/zsh -fnv strcatsub
$$0000${(e0z)^Y-000${(z)^Y-00>



{000000}0}0
00}${%0000000000000000000000000000000000000000�000000�00�0000���0000000${(fzfLl0200oNN�?>&9������//��?0B0mpr0200%����O�)3oN0iO0)c000%000000000000}�0�000000�00��0000000000000�00�}00%                                                                     
]]]

where the final % is in reverse video, but stays there even with -o nopromptsp.

If I remove the -f, it outputs the same junk, but preceded by the
entirety of my .zshenv.  All that goes to stderr.

My configure line:

    ./configure --enable-zsh-debug --with-term-lib=ncursesw --prefix=$HOME/prefix/zsh
    perl -pi -e 's/link=dynamic/link=static/g; if (/link=static/) { s/auto=yes/auto=no/ }' config.modules



Messages sorted by: Reverse Date, Date, Thread, Author