Lcd wrote:
> > > Scenario:
> > >
> > > (1) set a loclist:
> > >
> > > call setloclist(0, list)
> > >
> > > (2) at some point later replace the list:
> > >
> > > call setloclist(0, other_list, 'r')
> > >
> > > (3) open the quickfix window
> > >
> > > lopen
> > >
> > > (4) switch to the quickfix window and press Enter to jump to an error:
> > >
> > > .ll
> > >
> > > The result is a read from free'd memory; valgrind trace included
> > > below. It's easy to make Vim crash from there, but the stack trace
> > > doesn't reveal any additional information.
> > >
> > > Sadly, this is not consistently reproducible. I can trigger it
> > > in syntastic, but I can't seem to get the same result in a simple
> > > test file.
> >
> > I have sent out patch 7.4.379. Can you check that this fixes the
> > problem?
>
> That was something I tried too, but it doesn't work; new valgrind
> trace included below.
What exactly are the arguments to ex_cc when this happens? Without
knowing that the number of possibilities is too big.
Can you reproduce it with a fixed location list? Otherwise I can't
reproduce the problem.
> However, try as I might I can't reproduce the problem in a simpler
> setup, and that suggests the bug might be completely unrelated to
> setloclist(). The closest approximation of a rational explanation that
> I have so far is a scenario I accidentally run into yesterday, involving
> calling a void function in a non-void context. E.g.:
>
> function! s:foo()
> let var = 1
> endfunction
>
> if s:foo()
> " do something
> endif
>
> That happened because I deleted the return statement in s:foo()
> while refactoring it. To my surprise Vim didn't complain. My script
> jumped at some ranmdom place, but otherwise happily went on. I'm not
> familiar enough with the code to attempt a fix to that.
A function without a return statement should return the number zero.
As far as I can see that is what happens in your example.
--
OLD WOMAN: King of the WHO?
ARTHUR: The Britons.
OLD WOMAN: Who are the Britons?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.