Skip to content

Commit 889da2f

Browse files
committed
patch 8.1.0868: crash if triggering garbage collector after a function call
Problem: Crash if triggering garbage collector after a function call. (Michael Henry) Solution: Don't call the garbage collector right away, do it later. (closes #3894)
1 parent 6595125 commit 889da2f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/userfunc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -679,10 +679,10 @@ cleanup_function_call(funccall_T *fc)
679679
{
680680
// We have made a lot of copies. This can happen when
681681
// repetitively calling a function that creates a reference to
682-
// itself somehow. Call the garbage collector here to avoid using
682+
// itself somehow. Call the garbage collector soon to avoid using
683683
// too much memory.
684684
made_copy = 0;
685-
(void)garbage_collect(FALSE);
685+
want_garbage_collect = TRUE;
686686
}
687687
}
688688
}

src/version.c

+2
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ static char *(features[]) =
783783

784784
static int included_patches[] =
785785
{ /* Add new patch number below this line */
786+
/**/
787+
868,
786788
/**/
787789
867,
788790
/**/

0 commit comments

Comments
 (0)