From: Eduardo Bustamante <dualbus@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: Zsh parser segmentation fault in strcatsub
Date: Wed, 17 May 2017 21:21:37 -0500 [thread overview]
Message-ID: <CAOSMAusrh=w1iseU8WwaZwSYSb1Y6Aq5a8sgn6WuHPcLOcD61g@mail.gmail.com> (raw)
In-Reply-To: <170517113726.ZM27232@torch.brasslantern.com>
On Wed, May 17, 2017 at 1:37 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
[...]
>
> Can you repeat the crash with multibyte support disabled in the compile?
I can't get it to crash with multibyte support disabled. Also, it
seems that the --enable-zsh-debug makes the crash go away (although I
suspect that just may be because the payload doesn't overflow the
heap).
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=gcc-6 CFLAGS='-O0
-ggdb' ./configure --enable-zsh-debug --disable-multibyte && make -j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=gcc-6 CFLAGS='-O0
-ggdb' ./configure --enable-zsh-debug --enable-multibyte && make -j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=clang-3.9
CFLAGS='-O0 -ggdb' ./configure --enable-zsh-debug --disable-multibyte
&& make -j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=clang-3.9
CFLAGS='-O0 -ggdb' ./configure --enable-zsh-debug --enable-multibyte
&& make -j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=clang-3.9
CFLAGS='-O0 -ggdb' LDFLAGS='' ./configure --enable-multibyte && make
-j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
Segmentation fault
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=clang-3.9
CFLAGS='-O0 -ggdb' LDFLAGS='' ./configure --disable-multibyte && make
-j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Util/preconfig && CC=gcc-6 CFLAGS='-O0
-ggdb' LDFLAGS='' ./configure --enable-multibyte && make -j4
[...]
dualbus@debian:~/src/zsh/zsh$ md5sum /tmp/strcatsub
45a3a29522b0bd62d073d791b722ce02 /tmp/strcatsub
dualbus@debian:~/src/zsh/zsh$ ./Src/zsh -nf /tmp/strcatsub
Segmentation fault
The reason I build it with CFLAGS='-O0 -ggdb' LDFLAGS='' is that the
Makefile kept stripping symbols from the binary, so I hacked around it
by passing an empty LDFLAGS, but now I realize that --enable-zsh-debug
is what I was looking for.
next prev parent reply other threads:[~2017-05-18 2:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 21:30 Eduardo Bustamante
2017-05-16 0:48 ` Bart Schaefer
2017-05-16 1:36 ` Eduardo Bustamante
2017-05-16 3:38 ` Bart Schaefer
2017-05-17 18:37 ` Bart Schaefer
2017-05-18 2:21 ` Eduardo Bustamante [this message]
2017-05-16 8:47 ` Peter Stephenson
2017-05-16 13:30 ` Daniel Shahaf
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='CAOSMAusrh=w1iseU8WwaZwSYSb1Y6Aq5a8sgn6WuHPcLOcD61g@mail.gmail.com' \
--to=dualbus@gmail.com \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/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).