zsh-workers
 help / color / mirror / code / Atom feed
From: Axel Beckert <abe@deuxchevaux.org>
To: zsh-workers@zsh.org
Subject: Fwd: Bug#924736: zsh 5.7.1 segfaults when three setopt options are in play [origin: wesley@schwengle.net]
Date: Sat, 16 Mar 2019 22:41:55 +0100	[thread overview]
Message-ID: <20190316214155.GH10429@sym.noone.org> (raw)

Hi,

we at Debian received the following bug report at
https://bugs.debian.org/924736

I can confirm that this issue is present in zsh 5.7.1 as well as git
HEAD as of commit 947e26fe5a0083b42ef5db9cb0f8c46923602ae1:

----- Forwarded message from Wesley Schwengle <wesley@schwengle.net> -----
Date: Sat, 16 Mar 2019 18:54:27 +0100
From: Wesley Schwengle <wesley@schwengle.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: [Pkg-zsh-devel] Bug#924736: zsh 5.7.1 segfaults when three setopt options are in play
Reply-To: Wesley Schwengle <wesley@schwengle.net>, 924736@bugs.debian.org

Package: zsh
Version: 5.7.1-1
Severity: important

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

Have a zshrc with the following setopts:

setopt hist_reduce_blanks
setopt hist_ignore_space
setopt interactivecomments

* Run zsh -f
* Now enter `     #`
* You get a command not found error
* Now source your zshrc
* Again entery `     #`
* Segfault

I've reproduced it with a docker image from debian testing.
https://gist.github.com/waterkip/ab532e8dc65ad948046b6848dcfacffa

It does work on Debian stable (zsh 5.3.1).

Dockerfile contents:

FROM debian:testing
WORKDIR /root
RUN apt-get update && apt-get install --no-install-recommends -y zsh
COPY zsh/.zsh/minimal-zshrc .zshrc

$ dpkg -l zsh
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  zsh            5.7.1-1      amd64        shell with lots of features

-- Package-specific info:

Packages which provide vendor completions:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version                     Architecture Description
+++-==============-===========================-============-========================================================
ii  curl           7.64.0-1                    amd64        command line tool for transferring data with URL syntax
ii  docker-ce-cli  5:18.09.3~3-0~debian-buster amd64        Docker CLI: the open-source application container engine
ii  mpv            0.29.1-1                    amd64        video player based on MPlayer/mplayer2
ii  pulseaudio     12.2-4                      amd64        PulseAudio sound server
ii  systemd        241-1                       amd64        system and service manager
ii  udev           241-1                       amd64        /dev/ and hotplug management daemon
ii  vlc-bin        3.0.6-1                     amd64        binaries from VLC
ii  youtube-dl     2019.01.17-1                all          downloader of videos from YouTube and other sites

dpkg-query: no path found matching pattern /usr/share/zsh/vendor-functions/


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (100, 'unstable'), (50, 'experimental'), (10, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages zsh depends on:
ii  libc6       2.28-8
ii  libcap2     1:2.25-2
ii  libtinfo6   6.1+20181013-2
ii  zsh-common  5.7.1-1

Versions of packages zsh recommends:
ii  libc6         2.28-8
ii  libncursesw6  6.1+20181013-2
ii  libpcre3      2:8.39-11

Versions of packages zsh suggests:
pn  zsh-doc  <none>

-- no debconf information
----- End forwarded message -----

I can as well confirm that zsh 5.3.1 is not affected.

----- Forwarded message from wesleys@euronet.nl -----
Date: Sat, 16 Mar 2019 19:24:31 +0100 (CET)
From: wesleys@euronet.nl
To: 924736@bugs.debian.org
Subject: [Pkg-zsh-devel] Bug#924736: Acknowledgement (zsh 5.7.1 segfaults when three setopt options are
	in play)
Reply-To: wesleys@euronet.nl, 924736@bugs.debian.org



on #zsh there was some confusion about the reproduction path
`     #` should be typed *without* the backticks. Spaces are hard to show on a text only medium.

FWIW, it seems like an upstream bug, I can also reproduce it on Arch

Cheers,
Wesley
----- End forwarded message -----

Haven't had time to bisect this, but I got this backtrace from git
HEAD:

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./Src/zsh -f'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000558b2df7b10c in histreduceblanks ()
(gdb) bt
#0  0x0000558b2df7b10c in histreduceblanks ()
#1  0x0000558b2df80ecb in hend ()
#2  0x0000558b2df814bf in loop ()
#3  0x0000558b2df84be6 in zsh_main ()
#4  0x00007f4441f6109b in __libc_start_main (main=0x558b2df4ac90 <main>, argc=2, argv=0x7ffc57da4588, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc57da4578)
    at ../csu/libc-start.c:308
#5  0x0000558b2df4acca in _start ()
(gdb) 

		Kind regards, Axel
-- 
PGP: 2FF9CD59612616B5      /~\  Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: abe@deuxchevaux.org  \ /  Say No to HTML in E-Mail and Usenet
Mail+Jabber: abe@noone.org  X
https://axel.beckert.ch/   / \  I love long mails: https://email.is-not-s.ms/

             reply	other threads:[~2019-03-16 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190316214308epcas4p4470c8cac303dbbcdcec8e62a593e3ceb@epcas4p4.samsung.com>
2019-03-16 21:41 ` Axel Beckert [this message]
2019-03-16 22:28   ` Wesley Schwengle
2019-03-18 10:18   ` Fwd: " Peter Stephenson

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=20190316214155.GH10429@sym.noone.org \
    --to=abe@deuxchevaux.org \
    --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).