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

Re: Bug#459896: Segfaults in "apt-c(" completion



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.



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