diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-18 13:28:31 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-18 13:28:31 +0100 |
commit | 91c7cbfe31bbef57d5fcf7d76989fc159f73ef15 (patch) | |
tree | 95aa1ecfabd5937db15f10648d79a61f42c417e4 /src/testdir/test_vim9_script.vim | |
parent | 4875d6ab068f09df88d24d81de40dcd8d56e243d (diff) |
patch 9.0.0225: using freed memory with multiple line breaks in expressionv9.0.0225
Problem: Using freed memory with multiple line breaks in expression.
Solution: Free eval_tofree later.
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 56a39efcf7..597e31ec1c 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -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] |