File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3857,6 +3857,30 @@ garbage_collect(int testing)
38573857 garbage_collect_at_exit = FALSE;
38583858 }
38593859
3860+ // The execution stack can grow big, limit the size.
3861+ if (exestack .ga_maxlen - exestack .ga_len > 500 )
3862+ {
3863+ size_t new_len ;
3864+ char_u * pp ;
3865+ int n ;
3866+
3867+ // Keep 150% of the current size, with a minimum of the growth size.
3868+ n = exestack .ga_len / 2 ;
3869+ if (n < exestack .ga_growsize )
3870+ n = exestack .ga_growsize ;
3871+
3872+ // Don't make it bigger though.
3873+ if (exestack .ga_len + n < exestack .ga_maxlen )
3874+ {
3875+ new_len = exestack .ga_itemsize * (exestack .ga_len + n );
3876+ pp = vim_realloc (exestack .ga_data , new_len );
3877+ if (pp == NULL )
3878+ return FAIL ;
3879+ exestack .ga_maxlen = exestack .ga_len + n ;
3880+ exestack .ga_data = pp ;
3881+ }
3882+ }
3883+
38603884 // We advance by two because we add one for items referenced through
38613885 // previous_funccal.
38623886 copyID = get_copyID ();
Original file line number Diff line number Diff line change @@ -742,6 +742,8 @@ static char *(features[]) =
742742
743743static int included_patches [] =
744744{ /* Add new patch number below this line */
745+ /**/
746+ 61 ,
745747/**/
746748 60 ,
747749/**/
You can’t perform that action at this time.
0 commit comments