0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-02-02 14:02:30 +01:00
parent 65951258d6
commit 889da2f243
2 changed files with 4 additions and 2 deletions

View File

@@ -679,10 +679,10 @@ cleanup_function_call(funccall_T *fc)
{ {
// We have made a lot of copies. This can happen when // We have made a lot of copies. This can happen when
// repetitively calling a function that creates a reference to // repetitively calling a function that creates a reference to
// itself somehow. Call the garbage collector here to avoid using // itself somehow. Call the garbage collector soon to avoid using
// too much memory. // too much memory.
made_copy = 0; made_copy = 0;
(void)garbage_collect(FALSE); want_garbage_collect = TRUE;
} }
} }
} }

View File

@@ -783,6 +783,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
868,
/**/ /**/
867, 867,
/**/ /**/