Hari Krishna Dara wrote: > > I wrote: > > > > > Patch 7.0.082 > > > Problem: Calling a function that waits for input may cause List and > > > Dictionary arguments to be freed by the garbage collector. > > > 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 to > > internal functions, thus would free List and Dict arguments that are > > still in use. That leads to a double free later. The garbage collector > > only does it's work when the user doesn't type for a little while, that > > 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. -- Not too long ago, a program was something you watched on TV... /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///