Op vrijdag 23 november 2012 21:47:47 schreef Christian Brabandt:
> Hi Bram!
> 
> On Fr, 23 Nov 2012, Bram Moolenaar wrote:
> > Christian Brabandt wrote:
> > > Hi Dominique!
> > > 
> > > On Do, 22 Nov 2012, Dominique Pellé wrote:
> > > > I can't tell whether that's the right fix, but I confirm that
> > > > your proposed change avoids the crash at least.
> > > > 
> > > > wp->w_llist was set to NULL at line quickfix.c:914 which
> > > > 
> > > > was introduced by chane 3918 according to hg annotate:
> > > >  911 vimboss  644:     if (qi->qf_listcount == LISTCOUNT)
> > > >  912 vimboss    7:     {
> > > >  913    bram 3918:   if (wp != NULL && wp->w_llist == qi)
> > > >  914    bram 3918:       wp->w_llist = NULL;
> > > >  915 vimboss  644:   qf_free(qi, 0);
> > > > 
> > > > ===
> > > > changeset:   3918:4f0ddf4137ee
> > > > tag:         v7-3-715
> > > > user:        Bram Moolenaar <[email protected]>
> > > > date:        Wed Nov 14 22:38:08 2012 +0100
> > > > files:       src/quickfix.c src/testdir/test49.ok
> > > > src/testdir/test49.vim src/version.c
> > > > description:
> > > > updated for version 7.3.715
> > > > Problem:    Crash when calling setloclist() in BufUnload autocmd.
> > > > (Marcin
> > > > 
> > > >             Szamotulski)
> > > > 
> > > > Solution:   Set w_llist to NULL when it was freed.  Also add a test.
> > > > 
> > > >             (Christian Brabandt)
> > > > 
> > > > ===
> > > > 
> > > > I find it odd that a function called qf_new_list() clears
> > > > wp->w_llist (set it to NULL) and does not set it back
> > > > to something else. The name of the function "qf_new_list()"
> > > > suggests that it should create another list, so perhaps
> > > > it should set wp->w_llist to something else. But I don't
> > > > understand the code here.
> > > 
> > > Indeed. I think GET_LOC_LIST should be defined as
> > > ll_get_or_alloc_list(wp)
> > 
> > ll_get_or_alloc_list() can still return NULL, thus your check is needed
> > anyway.
> 
> It is still not right so. I'll look into it later.
> 
> regards,
> Christian

I have tested the patch on top of 725
had one segfault already (could not yet reproduce)

but the following i can reproduce every time:

same configuration as before, same file (index.php)
- open index.php (it still has the syntax error
- :w (syntastic kicks in)
- fix the error by adding ; after phpinfo()
- :w (no more error in the file)
- remove the ; again
- :w (syntastic kicks in)
- :w ->E776: No location list

"index.php" 2L, 16C written
Error detected while processing function 
<SNR>31_UpdateErrors..<SNR>31_AutoToggleLocList..<SNR>31_ShowLocList:
line    3:
E776: No location list
Press ENTER or type command to continue

no crash in this case, if i continue after this issue i get a second quickfix 
buffer.

thx for the intermediate fix it is definatly an improvement.

--Ike

-- 
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

Raspunde prin e-mail lui