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.

-- 
hundred-and-one symptoms of being an internet addict:
59. Your wife says communication is important in a marriage...so you buy
    another computer and install a second phone line so the two of you can
    chat.

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

Raspunde prin e-mail lui