summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-02 14:02:30 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-02 14:02:30 +0100
commit889da2f2438c8168f9a25dc776360b81109bad44 (patch)
treeaf2570de1da88ea3d01c90af69c894e8ffa07dd9
parent65951258d65b71581aeb117dbb7defa8a87ce38f (diff)
downloadvim-git-889da2f2438c8168f9a25dc776360b81109bad44.tar.gz
patch 8.1.0868: crash if triggering garbage collector after a function callv8.1.0868
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)
-rw-r--r--src/userfunc.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index aae3fd334..acbab901f 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -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;
}
}
}
diff --git a/src/version.c b/src/version.c
index 92e980559..1a2e2befc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -784,6 +784,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 868,
+/**/
867,
/**/
866,