0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.2143

Problem:    A funccal is garbage collected while it can still be used.
Solution:   Set copyID in all referenced functions.  Do not list lambda
            functions with ":function".
This commit is contained in:
Bram Moolenaar
2016-08-01 22:49:22 +02:00
parent 8dd3a43d75
commit bc7ce675b2
5 changed files with 98 additions and 57 deletions

View File

@@ -5304,6 +5304,9 @@ garbage_collect(int testing)
/* function-local variables */
abort = abort || set_ref_in_call_stack(copyID);
/* named functions (matters for closures) */
abort = abort || set_ref_in_functions(copyID);
/* function call arguments, if v:testing is set. */
abort = abort || set_ref_in_func_args(copyID);