From: Axel Beckert <abe@deuxchevaux.org>
To: zsh-workers@zsh.org
Subject: Re: Segfault on "task <Tab><Tab>" with zsh 5.0.2
Date: Fri, 13 Sep 2013 13:34:12 +0200 [thread overview]
Message-ID: <20130913113412.GZ19439@sym.noone.org> (raw)
In-Reply-To: <20130913093732.25326b25@pwslap01u.europe.root.pri>
Hi Peter,
On Fri, Sep 13, 2013 at 09:37:32AM +0100, Peter Stephenson wrote:
> On Fri, 13 Sep 2013 00:18:13 +0200
> Axel Beckert <abe@deuxchevaux.org> wrote:
> > I managed to get my zsh 5.0.2 to segfault on entering "task " and then
> > pressing the tabulator key twice.
> > First few lines of the backtrace:
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > freecvdef (d=0x100000001) at ../../../Src/Zle/computil.c:2799
> > 2799 ../../../Src/Zle/computil.c: No such file or directory.
> > #0 freecvdef (d=0x100000001) at ../../../Src/Zle/computil.c:2799
> > #1 0x00007ffff599f8a4 in get_cvdef (args=<optimized out>, nam=<optimized out>) at ../../../Src/Zle/computil.c:2998
> > #2 bin_compvalues (nam=<optimized out>, args=<optimized out>, ops=<optimized out>, func=<optimized out>) at ../../../Src/Zle/computil.c:3347
>
> Looks like a memory error. Does valgrind give any extra hints?
Not sure if used valgrind properly, but it looks as if it found
something:
% valgrind zsh -f
==6722== Memcheck, a memory error detector
==6722== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==6722== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==6722== Command: zsh -f
==6722==
==6722== Syscall param capget(data) points to unaddressable byte(s)
==6722== at 0x584AD77: capget (syscall-template.S:81)
==6722== by 0x4E34902: cap_init (in /lib/x86_64-linux-gnu/libcap.so.2.22)
==6722== by 0x4E34995: cap_get_proc (in /lib/x86_64-linux-gnu/libcap.so.2.22)
==6722== by 0x488184: privasserted (in /bin/zsh5)
==6722== by 0x46FF92: putpromptchar (in /bin/zsh5)
==6722== by 0x471178: promptexpand (in /bin/zsh5)
==6722== by 0x488A21: preprompt (in /bin/zsh5)
==6722== by 0x43CC97: loop (in /bin/zsh5)
==6722== by 0x43FD65: zsh_main (in /bin/zsh5)
==6722== by 0x5783994: (below main) (libc-start.c:260)
==6722== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==6722==
kiva6% autoload -Uz compinit
kiva6% compinit
==6726==
==6726== HEAP SUMMARY:
==6726== in use at exit: 630,408 bytes in 18,315 blocks
==6726== total heap usage: 24,460 allocs, 6,145 frees, 5,131,211 bytes allocated
==6726==
==6726== LEAK SUMMARY:
==6726== definitely lost: 0 bytes in 0 blocks
==6726== indirectly lost: 0 bytes in 0 blocks
==6726== possibly lost: 0 bytes in 0 blocks
==6726== still reachable: 630,408 bytes in 18,315 blocks
==6726== suppressed: 0 bytes in 0 blocks
==6726== Rerun with --leak-check=full to see details of leaked memory
==6726==
==6726== For counts of detected and suppressed errors, rerun with: -v
==6726== ERROR SUMMARY: 5 errors from 1 contexts (suppressed: 2 from 2)
kiva6% task ==6722== Invalid read of size 8
==6722== at 0x7FF2E8C: freecvdef (in /usr/lib/x86_64-linux-gnu/zsh/5.0.2/zsh/computil.so)
==6722== by 0x7FF68A3: bin_compvalues (in /usr/lib/x86_64-linux-gnu/zsh/5.0.2/zsh/computil.so)
==6722== by 0x41C8D5: execbuiltin (in /bin/zsh5)
==6722== by 0x42A78F: execcmd (in /bin/zsh5)
==6722== by 0x42ACEC: execpline2 (in /bin/zsh5)
==6722== by 0x42B213: execpline (in /bin/zsh5)
==6722== by 0x42C5A1: execlist (in /bin/zsh5)
==6722== by 0x44C1BF: execif (in /bin/zsh5)
==6722== by 0x429CAE: execcmd (in /bin/zsh5)
==6722== by 0x42ACEC: execpline2 (in /bin/zsh5)
==6722== by 0x42B213: execpline (in /bin/zsh5)
==6722== by 0x42C5A1: execlist (in /bin/zsh5)
==6722== Address 0x100000001 is not stack'd, malloc'd or (recently) free'd
==6722==
==6722==
==6722== Process terminating with default action of signal 11 (SIGSEGV)
==6722== Access not within mapped region at address 0x100000001
==6722== at 0x7FF2E8C: freecvdef (in /usr/lib/x86_64-linux-gnu/zsh/5.0.2/zsh/computil.so)
==6722== by 0x7FF68A3: bin_compvalues (in /usr/lib/x86_64-linux-gnu/zsh/5.0.2/zsh/computil.so)
==6722== by 0x41C8D5: execbuiltin (in /bin/zsh5)
==6722== by 0x42A78F: execcmd (in /bin/zsh5)
==6722== by 0x42ACEC: execpline2 (in /bin/zsh5)
==6722== by 0x42B213: execpline (in /bin/zsh5)
==6722== by 0x42C5A1: execlist (in /bin/zsh5)
==6722== by 0x44C1BF: execif (in /bin/zsh5)
==6722== by 0x429CAE: execcmd (in /bin/zsh5)
==6722== by 0x42ACEC: execpline2 (in /bin/zsh5)
==6722== by 0x42B213: execpline (in /bin/zsh5)
==6722== by 0x42C5A1: execlist (in /bin/zsh5)
==6722== If you believe this happened as a result of a stack
==6722== overflow in your program's main thread (unlikely but
==6722== possible), you can try to increase the size of the
==6722== main thread stack using the --main-stacksize= flag.
==6722== The main thread stack size used in this run was 8388608.
==6722==
==6722== HEAP SUMMARY:
==6722== in use at exit: 893,406 bytes in 22,714 blocks
==6722== total heap usage: 233,166 allocs, 210,452 frees, 17,418,357 bytes allocated
==6722==
==6722== LEAK SUMMARY:
==6722== definitely lost: 0 bytes in 0 blocks
==6722== indirectly lost: 0 bytes in 0 blocks
==6722== possibly lost: 0 bytes in 0 blocks
==6722== still reachable: 893,406 bytes in 22,714 blocks
==6722== suppressed: 0 bytes in 0 blocks
==6722== Rerun with --leak-check=full to see details of leaked memory
==6722==
==6722== For counts of detected and suppressed errors, rerun with: -v
==6722== ERROR SUMMARY: 8 errors from 2 contexts (suppressed: 2 from 2)
[1] 6722 segmentation fault (core dumped) valgrind zsh -f
valgrind zsh -f 14.68s user 1.45s system 26% cpu 1:01.61 total
HTH.
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail)
X See http://www.asciiribbon.org/ | abe@noone.org (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)
next prev parent reply other threads:[~2013-09-13 11:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 22:18 Axel Beckert
2013-09-13 8:37 ` Peter Stephenson
2013-09-13 11:34 ` Axel Beckert [this message]
2013-09-13 11:51 ` Peter Stephenson
2013-09-13 12:24 ` Axel Beckert
2013-09-13 12:36 ` Peter Stephenson
2013-09-13 19:33 ` Pierre Schmitz
2013-09-16 16:17 ` Ivan S. Freitas
2013-09-16 17:18 ` Axel Beckert
2013-09-17 8:56 ` Peter Stephenson
2013-09-17 16:10 ` Segfault on "task <Tab><Tab>" with zsh 5.0.2 (minimal dataset to reproduce the issue found) Axel Beckert
2013-09-17 16:35 ` Axel Beckert
2013-09-17 19:05 ` Peter Stephenson
2013-09-17 20:12 ` Axel Beckert
2013-09-18 3:05 ` Bart Schaefer
2013-09-18 21:50 ` Segfault on "task <Tab><Tab>" with zsh 5.0.2 [PATCH] Axel Beckert
2013-09-19 8:49 ` Peter Stephenson
2013-09-19 14:42 ` Bart Schaefer
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=20130913113412.GZ19439@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).