To: vim_dev@googlegroups.com Subject: Patch 7.4.1866 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1866 Problem: Invalid memory access when exiting with EXITFREE defined. (Dominique Pelle) Solution: Set "really_exiting" and skip error messages. Files: src/misc2.c, src/eval.c *** ../vim-7.4.1865/src/misc2.c 2016-05-28 22:22:28.830213562 +0200 --- src/misc2.c 2016-06-01 22:14:25.281466210 +0200 *************** *** 1044,1049 **** --- 1044,1052 ---- return; entered = TRUE; + /* Set this flag to indicate some errors can be ignored. */ + really_exiting = TRUE; + # ifdef FEAT_AUTOCMD /* Don't want to trigger autocommands from here on. */ block_autocmds(); *** ../vim-7.4.1865/src/eval.c 2016-06-01 22:08:13.637471322 +0200 --- src/eval.c 2016-06-01 22:13:32.501466936 +0200 *************** *** 25348,25354 **** { fp = find_func(name); if (fp == NULL) ! EMSG2(_(e_intern2), "func_unref()"); else if (--fp->uf_refcount <= 0) { /* Only delete it when it's not being used. Otherwise it's done --- 25348,25358 ---- { fp = find_func(name); if (fp == NULL) ! { ! /* Ignore when invoked through free_all_mem(). */ ! if (!really_exiting) ! EMSG2(_(e_intern2), "func_unref()"); ! } else if (--fp->uf_refcount <= 0) { /* Only delete it when it's not being used. Otherwise it's done *** ../vim-7.4.1865/src/version.c 2016-06-01 22:08:13.637471322 +0200 --- src/version.c 2016-06-01 22:18:40.101462705 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1866, /**/ -- If you put 7 of the most talented OSS developers in a room for a week and asked them to fix a bug in a spreadsheet program, in 1 week you'd have 2 new mail readers and a text-based web browser. /// 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 ///