diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-17 21:18:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-17 21:18:41 +0200 |
commit | 6e5000d493b4f385f901eb97f3ce0c8088373403 (patch) | |
tree | b891636c8899ba15790bf631a2ac486efe3bda6d /src/testdir/test_vimscript.vim | |
parent | ad24a71e2248e839c875c0bc0e6ad3dbeea16998 (diff) | |
download | vim-git-6e5000d493b4f385f901eb97f3ce0c8088373403.tar.gz |
patch 8.1.1563: crash when using closuresv8.1.1563
Problem: Crash when using closures.
Solution: Set reference in varlist of funccal when running the garbage
collector. (Ozaki Kiichi, closes #4554, closes #4547)
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r-- | src/testdir/test_vimscript.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 39ee0bfee..328d19fa5 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -1665,6 +1665,17 @@ func Test_refcount() delfunc DictFunc endfunc +func! Test_funccall_garbage_collect() + func Func(x, ...) + call add(a:x, a:000) + endfunc + call Func([], []) + " Must not crash cause by invalid freeing + call test_garbagecollect_now() + call assert_true(v:true) + delfunc Func +endfunc + "------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=4 tw=80 fdm=marker |