Richard Brown wrote:

> > > Hi, 7.3.449 fixed an issue where this autocommand and the following
> > > sequence would cause a segfault:
> > >
> > > :autocmd BufWinLeave * if empty(&bt) | lclose | endif
> > > :call setloclist(1, [{'bufnr': 1, 'lnum': 1, 'text': 'testing'}])
> > > :lopen
> > > ^wk
> > > :q
> > >
> >
> > Considering that 7.3.545 fixes a problem with autocommands, it's
> > unlikely that it introduced the problem, but rather uncovered another
> > problem.
> >
> > Does that sequence of commands segfault also for "vim -u NONE"?
> >
> 
> Yes, I should have said that I was doing that, sorry. The backtrace didn't
> seem to offer much before, but here it is for Included patches: 1-638, 638
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000001001553e5 in update_screen (type=40) at screen.c:478
> 478 if (wp->w_buffer->b_mod_set)
> (gdb) bt
> #0  0x00000001001553e5 in update_screen (type=40) at screen.c:478
> #1  0x00000001001def0f in main_loop (cmdwin=0, noexmode=0) at main.c:1197
> #2  0x00000001001debce in main (argc=3, argv=0x7fff5fbffbe8) at main.c:998

At some point I decided to set w_buffer to NULL when it is no longer
valid.  Previously there would be a dangling pointer that might still
work.  This turns unpredictable behavior into a reliable crash :-).
Hopefully this is one such case and we can figure out how to fix it.
Most likely "wp" is no longer valid (I didn't look at the context yet).


-- 
ARTHUR: (as the MAN next to him is squashed by a sheep) Knights!  Run away!
   Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
   cow or goose hitting them still.  The KNIGHTS crouch down under cover.
                 "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

Raspunde prin e-mail lui