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

Re: completion crash



On Wed, 30 Mar 2011 20:34:46 +0200
Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> So I'm in permmatches, [1], and after this makearray call, the prpre
> pointer is off, I have never looked at this code before though, so I
> don't really know where this mlist array is coming from.

The nearest fix I can see to code of this kind is zsh-workers/22565,
http://www.zsh.org/mla/workers/2006/msg00452.html

though there may be others in that neighbourhood; I'm certainly vaguely
aware of one that smelled similar over the last few years and the commit
log for compcore.c suggests it's probably that (though I don't know the
one I'm thinking of was fixed in compcore.c).  It's all down to the
fact that the place is full of global variables that are tied to a
particular memory allocation state without any guide to the programmer
or debugger of how.  So you end up having to guess where it is or isn't
appropriate to use, ignore or clear those variables.

zsh-workers/23478,
http://www.zsh.org/mla/workers/2007/msg00399.html
is also similar; that was in compresult.c, also 20150,
http://www.zsh.org/mla/workers/2004/msg00803.html

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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