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

Re: core dump with completion



Tanaka Akira wrote:

> zsh patched upto 9421 dumps core on Solaris 7 as follows:
> 
> Z:akr@is27e1u11% cvs co -r zsh-workers_9421 -d zsh9421 zsh
> Z:akr@is27e1u11% cd zsh9421
> Z:akr@is27e1u11% Util/preconfig
> Z:akr@is27e1u11%  ./configure --prefix=/space/akr/zsh/tmp --enable-zsh-debug --enable-zsh-mem-debug && make && make install
> Z:akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; autoload -U compinit; compinit -D
> is27e1u11% ls c<TAB>
> is27e1u11% ls config<TAB>
> zsh: segmentation fault (core dumped)  Src/zsh -f
> Z:akr@is27e1u11% 

Damn. I hate memory bugs.

> (gdb) where
> #0  0xff145c8c in realfree ()
> #1  0xff146460 in cleanfree ()
> #2  0xff145628 in _malloc_unlocked ()
> #3  0xff145544 in malloc ()
> #4  0x681d0 in zalloc (size=45) at mem.c:491

Urgh. It shouldn't be using zalloc'ed memory here. I can easily send a 
patch for this, but...

All this seems to show some other allocation bug (I guess some
function writes into memory it hasn't allocated) which might be hidden 
if I send the patch to make it use heap memory now, so...

But I can't repeat the bug. Tanaka, can you try it using --enable-zsh-mem,
--enable-secure-free and --enable-mem-warining? That may (or may not)
give us more information where it is actually failing. Also: does it
use mmap for heaps on Solaris 7?


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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