To: vim_dev@googlegroups.com Subject: Patch 8.0.1214 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1214 Problem: Accessing freed memory when EXITFREE is set and there is more than one tab and window. (Dominique Pelle) Solution: Free options later. Skip redraw when exiting. Files: src/screen.c, src/misc2.c *** ../vim-8.0.1213/src/screen.c 2017-10-01 14:34:58.577346624 +0200 --- src/screen.c 2017-10-23 21:47:06.852545240 +0200 *************** *** 203,209 **** win_T *wp, int type) { ! if (wp->w_redr_type < type) { wp->w_redr_type = type; if (type >= NOT_VALID) --- 203,209 ---- win_T *wp, int type) { ! if (!exiting && wp->w_redr_type < type) { wp->w_redr_type = type; if (type >= NOT_VALID) *** ../vim-8.0.1213/src/misc2.c 2017-09-22 15:20:27.740148617 +0200 --- src/misc2.c 2017-10-23 21:37:39.576392638 +0200 *************** *** 1135,1141 **** free_all_autocmds(); # endif clear_termcodes(); - free_all_options(); free_all_marks(); alist_clear(&global_alist); free_homedir(); --- 1135,1140 ---- *************** *** 1196,1201 **** --- 1195,1203 ---- /* Destroy all windows. Must come before freeing buffers. */ win_free_all(); + /* Free all option values. Must come after closing windows. */ + free_all_options(); + /* Free all buffers. Reset 'autochdir' to avoid accessing things that * were freed already. */ #ifdef FEAT_AUTOCHDIR *** ../vim-8.0.1213/src/version.c 2017-10-22 21:11:08.199850501 +0200 --- src/version.c 2017-10-23 21:53:04.958117317 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1214, /**/ -- "Hegel was right when he said that we learn from history that man can never learn anything from history." (George Bernard Shaw) /// Bram Moolenaar -- Bram@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 ///