Skip to content

Commit

Permalink
patch 8.1.0868: crash if triggering garbage collector after a functio…
Browse files Browse the repository at this point in the history
…n 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)
  • Loading branch information
brammool committed Feb 2, 2019
1 parent 6595125 commit 889da2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/userfunc.c
Expand Up @@ -679,10 +679,10 @@ cleanup_function_call(funccall_T *fc)
{
// We have made a lot of copies. This can happen when
// 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.
made_copy = 0;
(void)garbage_collect(FALSE);
want_garbage_collect = TRUE;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -783,6 +783,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
868,
/**/
867,
/**/
Expand Down

0 comments on commit 889da2f

Please sign in to comment.