zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-workers@sunsite.dk, 459896-submitter@bugs.debian.org
Subject: Re: Bug#459896: Segfaults in "apt-c(" completion
Date: Wed, 9 Jan 2008 15:57:32 -0500	[thread overview]
Message-ID: <20080109205732.GA7844@scowler.net> (raw)
In-Reply-To: <200801091735.m09HZUf8007116@news01.csr.com>

On Wed, Jan 09, 2008 at 05:35:30PM +0000, Peter Stephenson wrote:
> Doesn't happen here, but in any case I suspect this is some quite basic
> problem since the "(" forces the shell to complete all possible commands
> after it.  So it's simply searching the entire set of tables for things
> that can occur in command position.  It's probably some memory
> allocation thing.

More info from valgrind:

==7792== Invalid read of size 4
==7792==    at 0x80A1D23: pattryrefs (pattern.c:1873)
==7792==    by 0x80A25C7: pattry (pattern.c:1824)
==7792==    by 0x8097353: scanparamvals (params.c:517)
==7792==    by 0x47D3CC5: scanpmcommands (parameter.c:265)
==7792==    by 0x8074AE1: scanmatchtable (hashtable.c:381)
==7792==    by 0x8074B3B: scanhashtable (hashtable.c:444)
==7792==    by 0x80949C9: paramvalarr (params.c:551)
==7792==    by 0x8094A5D: getvaluearr (params.c:569)
==7792==    by 0x80955AA: getarg (params.c:1305)
==7792==    by 0x8096601: getindex (params.c:1591)
==7792==    by 0x80977CF: fetchvalue (params.c:1808)
==7792==    by 0x80AB2E3: stringsubst (subst.c:1912)
==7792==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7792==
==7792== Process terminating with default action of signal 11 (SIGSEGV)
==7792==  Access not within mapped region at address 0x0
==7792==    at 0x80A1D23: pattryrefs (pattern.c:1873)
==7792==    by 0x80A25C7: pattry (pattern.c:1824)
==7792==    by 0x8097353: scanparamvals (params.c:517)
==7792==    by 0x47D3CC5: scanpmcommands (parameter.c:265)
==7792==    by 0x8074AE1: scanmatchtable (hashtable.c:381)
==7792==    by 0x8074B3B: scanhashtable (hashtable.c:444)
==7792==    by 0x80949C9: paramvalarr (params.c:551)
==7792==    by 0x8094A5D: getvaluearr (params.c:569)
==7792==    by 0x80955AA: getarg (params.c:1305)
==7792==    by 0x8096601: getindex (params.c:1591)
==7792==    by 0x80977CF: fetchvalue (params.c:1808)
==7792==    by 0x80AB2E3: stringsubst (subst.c:1912)
==7792==
==7792== ERROR SUMMARY: 11 errors from 7 contexts (suppressed: 75 from 1)
==7792== malloc/free: in use at exit: 943,011 bytes in 29,311 blocks.
==7792== malloc/free: 40,321 allocs, 11,010 frees, 3,810,434 bytes allocated.
==7792== For counts of detected errors, rerun with: -v
==7792== searching for pointers to 29,311 not-freed blocks.
==7792== checked 1,294,940 bytes.
==7792==
==7792== LEAK SUMMARY:
==7792==    definitely lost: 312 bytes in 22 blocks.
==7792==      possibly lost: 0 bytes in 0 blocks.
==7792==    still reachable: 942,699 bytes in 29,289 blocks.
==7792==         suppressed: 0 bytes in 0 blocks.
==7792== Rerun with --leak-check=full to see details of leaked memory.


  reply	other threads:[~2008-01-09 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080109122004.GA20014@bee.dooz.org>
2008-01-09 14:51 ` Clint Adams
2008-01-09 17:35   ` Peter Stephenson
2008-01-09 20:57     ` Clint Adams [this message]
2008-01-10 10:12       ` 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=20080109205732.GA7844@scowler.net \
    --to=clint@zsh.org \
    --cc=459896-submitter@bugs.debian.org \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /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).