Patch 8.0.1404
Problem:    Invalid memory access on exit when autocommands wipe out a buffer.
            (gy741, Dominique Pelle)
Solution:   Check if the buffer is still valid. (closes #2449)
Files:      src/main.c


*** ../vim-8.0.1403/src/main.c  2017-11-12 19:21:06.561379665 +0100
--- src/main.c  2017-12-18 16:03:03.187765965 +0100
***************
*** 1432,1440 ****
                buf = wp->w_buffer;
                if (CHANGEDTICK(buf) != -1)
                {
                    apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
                                                    buf->b_fname, FALSE, buf);
!                   CHANGEDTICK(buf) = -1;  /* note that we did it already */
                    /* start all over, autocommands may mess up the lists */
                    next_tp = first_tabpage;
                    break;
--- 1432,1445 ----
                buf = wp->w_buffer;
                if (CHANGEDTICK(buf) != -1)
                {
+                   bufref_T bufref;
+ 
+                   set_bufref(&bufref, buf);
                    apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname,
                                                    buf->b_fname, FALSE, buf);
!                   if (bufref_valid(&bufref))
!                       CHANGEDTICK(buf) = -1;  /* note we did it already */
! 
                    /* start all over, autocommands may mess up the lists */
                    next_tp = first_tabpage;
                    break;
*** ../vim-8.0.1403/src/version.c       2017-12-18 15:32:55.274906330 +0100
--- src/version.c       2017-12-18 15:49:33.980822507 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1404,
  /**/


-- 
hundred-and-one symptoms of being an internet addict:
123. You ask the car dealer to install an extra cigarette lighter
     on your new car to power your notebook.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui