Patch 8.2.0061
Problem:    The execute stack can grow big and never shrinks.
Solution:   Reduce the size in gargage collect.
Files:      src/eval.c


*** ../vim-8.2.0060/src/eval.c  2019-12-25 19:33:18.520594684 +0100
--- src/eval.c  2019-12-30 19:12:49.939679473 +0100
***************
*** 3857,3862 ****
--- 3857,3886 ----
        garbage_collect_at_exit = FALSE;
      }
  
+     // The execution stack can grow big, limit the size.
+     if (exestack.ga_maxlen - exestack.ga_len > 500)
+     {
+       size_t  new_len;
+       char_u  *pp;
+       int     n;
+ 
+       // Keep 150% of the current size, with a minimum of the growth size.
+       n = exestack.ga_len / 2;
+       if (n < exestack.ga_growsize)
+           n = exestack.ga_growsize;
+ 
+       // Don't make it bigger though.
+       if (exestack.ga_len + n < exestack.ga_maxlen)
+       {
+           new_len = exestack.ga_itemsize * (exestack.ga_len + n);
+           pp = vim_realloc(exestack.ga_data, new_len);
+           if (pp == NULL)
+               return FAIL;
+           exestack.ga_maxlen = exestack.ga_len + n;
+           exestack.ga_data = pp;
+       }
+     }
+ 
      // We advance by two because we add one for items referenced through
      // previous_funccal.
      copyID = get_copyID();
*** ../vim-8.2.0060/src/version.c       2019-12-30 17:55:30.464513273 +0100
--- src/version.c       2019-12-30 18:49:36.393455543 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     61,
  /**/

-- 
5 out of 4 people have trouble with fractions.

 /// 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/201912301820.xBUIKcYm028960%40masaka.moolenaar.net.

Raspunde prin e-mail lui