To: vim_dev@googlegroups.com Subject: Patch 8.2.1443 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1443 Problem: Vim9: crash when interrupting a nested :def function. Solution: Push a dummy return value onto the stack. (closes #6701) Files: src/vim9execute.c *** ../vim-8.2.1442/src/vim9execute.c 2020-08-12 21:34:43.266489468 +0200 --- src/vim9execute.c 2020-08-13 21:33:57.464241849 +0200 *************** *** 915,930 **** } else { ! // not inside try or need to return from current functions. if (ectx.ec_frame_idx == initial_frame_idx) { ! // At the toplevel we are done. Push a dummy return value. ! if (GA_GROW(&ectx.ec_stack, 1) == FAIL) ! goto failed; ! tv = STACK_TV_BOT(0); ! tv->v_type = VAR_NUMBER; ! tv->vval.v_number = 0; ! ++ectx.ec_stack.ga_len; need_rethrow = TRUE; if (handle_closure_in_use(&ectx, FALSE) == FAIL) goto failed; --- 915,931 ---- } else { ! // Not inside try or need to return from current functions. ! // Push a dummy return value. ! if (GA_GROW(&ectx.ec_stack, 1) == FAIL) ! goto failed; ! tv = STACK_TV_BOT(0); ! tv->v_type = VAR_NUMBER; ! tv->vval.v_number = 0; ! ++ectx.ec_stack.ga_len; if (ectx.ec_frame_idx == initial_frame_idx) { ! // At the toplevel we are done. need_rethrow = TRUE; if (handle_closure_in_use(&ectx, FALSE) == FAIL) goto failed; *** ../vim-8.2.1442/src/version.c 2020-08-13 21:05:31.789361598 +0200 --- src/version.c 2020-08-13 21:39:43.231274879 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1443, /**/ -- hundred-and-one symptoms of being an internet addict: 194. Your business cards contain your e-mail and home page address. /// 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 ///