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 -- [email protected] -- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202008131940.07DJeiY1430143%40masaka.moolenaar.net.

Raspunde prin e-mail lui