1
0
forked from aniani/vim

patch 9.0.0225: using freed memory with multiple line breaks in expression

Problem:    Using freed memory with multiple line breaks in expression.
Solution:   Free eval_tofree later.
This commit is contained in:
Bram Moolenaar
2022-08-18 13:28:31 +01:00
parent 4875d6ab06
commit 91c7cbfe31
5 changed files with 77 additions and 59 deletions

View File

@@ -1560,6 +1560,19 @@ def Test_func_redefine_fails()
v9.CheckScriptFailure(lines, 'E1073:')
enddef
def Test_lambda_split()
# this was using freed memory, because of the split expression
var lines =<< trim END
vim9script
try
0
0->(0
->a.0(
->u
END
v9.CheckScriptFailure(lines, 'E1050:')
enddef
def Test_fixed_size_list()
# will be allocated as one piece of memory, check that changes work
var l = [1, 2, 3, 4]