mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.1.1563: crash when using closures
Problem: Crash when using closures.
Solution: Set reference in varlist of funccal when running the garbage
collector. (Ozaki Kiichi, closes vim/vim#4554, closes vim/vim#4547)
6e5000d493
This commit is contained in:
@@ -1409,6 +1409,17 @@ func Test_compound_assignment_operators()
|
||||
let @/ = ''
|
||||
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
|
||||
|
||||
func Test_function_defined_line()
|
||||
if has('gui_running')
|
||||
" Can't catch the output of gvim.
|
||||
|
Reference in New Issue
Block a user