44844Re: Patch 7.0.082
- Sep 8, 2006On Tue, 5 Sep 2006 at 5:19pm, Hari Krishna Dara wrote:
> On Mon, 4 Sep 2006 at 9:50pm, Bram Moolenaar wrote:
> > Hari Krishna Dara wrote:
> > > > I wrote:
> > > >
> > > > > Patch 7.0.082
> > > > > Problem: Calling a function that waits for input may cause List
> > > > > Dictionary arguments to be freed by the garbage collector.to
> > > > > Solution: Keep a list of all arguments to internal functions.
> > > > > Files: src/eval.c
> > > >
> > > > I vaguely recall that some people were having unreproducible crashes
> > > > when using input() or inputlist(). This patch should solve that.
> > > >
> > > > What happened was that the garbage collector didn't see the arguments
> > > > internal functions, thus would free List and Dict arguments that arecollector
> > > > still in use. That leads to a double free later. The garbage
> > > > only does it's work when the user doesn't type for a little while, thatI hit the error while debugging again. I did an echo on a list and did a
> > > > made it unpredictable when it would happen.
> > >
> > > Can this happen during the debug session also? Like, when you do >echo
> > > on lists? I am seeing that while debugging scripts that use Lists for
> > > sometime, Vim almost always crashes. Sometimes, I also start seeing
> > > internal errors related to List access (sorry, I didn't notedown the
> > > numbers) before it crashes.
> > Yes, this could also happen in debug mode. If you don't type something
> > for 'updatetime' seconds the garbage collector is invoked.
> > But the fix is only for when you pass a List or Dictionary to an
> > internal function. User functions were already OK.
> > Hmm, now that I think of it you could get problems with a command like
> > this:
> > :echo [1, 2, 3, ..., 2000]
> > If you get the "more" prompt the garbage collector might delete the list
> > before it's completely echoed. I'll look into that.
> This is probably what I was doing during the debugging. I will try to
> notice if an :echo on a list in a long running debug session is what is
> causing the crash.
>quit after a few seconds. Instead of debug session abortingimmediately, I got this below error:
E685: Internal error: clear_tv()
And it continued executing after that with several errors all seem to be
because of corrupted list. The list that I echoed is no longer treated
as a List type and function calls such as sort() that I had after that
resulted in errors. A subsequent >quit worked and aborted the debug
session. If I had continued executing debug commands, I am pretty sure
that it would have resulted in a Vim crash.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
- << Previous post in topic Next post in topic >>