To: vim_dev@googlegroups.com Subject: Patch 8.2.0566 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0566 Problem: Vim9: variable can be used uninitialized. Solution: Jump to after where variable is used. Files: src/vim9execute.c *** ../vim-8.2.0565/src/vim9execute.c 2020-04-12 22:22:27.060446273 +0200 --- src/vim9execute.c 2020-04-12 23:07:25.717543068 +0200 *************** *** 524,530 **** else argc -= vararg_count; if (exe_newlist(vararg_count, &ectx) == FAIL) ! goto failed; if (defcount > 0) // Move varargs list to below missing default arguments. *STACK_TV_BOT(defcount- 1) = *STACK_TV_BOT(-1); --- 524,530 ---- else argc -= vararg_count; if (exe_newlist(vararg_count, &ectx) == FAIL) ! goto failed_early; if (defcount > 0) // Move varargs list to below missing default arguments. *STACK_TV_BOT(defcount- 1) = *STACK_TV_BOT(-1); *************** *** 1773,1779 **** // When failed need to unwind the call stack. while (ectx.ec_frame != initial_frame_ptr) func_return(&ectx); ! for (idx = 0; idx < ectx.ec_stack.ga_len; ++idx) clear_tv(STACK_TV(idx)); vim_free(ectx.ec_stack.ga_data); --- 1773,1779 ---- // When failed need to unwind the call stack. while (ectx.ec_frame != initial_frame_ptr) func_return(&ectx); ! failed_early: for (idx = 0; idx < ectx.ec_stack.ga_len; ++idx) clear_tv(STACK_TV(idx)); vim_free(ectx.ec_stack.ga_data); *** ../vim-8.2.0565/src/version.c 2020-04-12 22:53:50.767656185 +0200 --- src/version.c 2020-04-12 23:08:55.581310682 +0200 *************** *** 740,741 **** --- 740,743 ---- { /* Add new patch number below this line */ + /**/ + 566, /**/ -- The problem with political jokes is that they get elected. /// 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 ///