Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 29771:c71a42be2d7f v9.0.0225
patch 9.0.0225: using freed memory with multiple line breaks in expression
Commit: https://github.com/vim/vim/commit/91c7cbfe31bbef57d5fcf7d76989fc159f73ef15
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 18 13:28:31 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 18 Aug 2022 14:30:05 +0200 |
parents | e0259a817d82 |
children | 35cbea786334 |
line wrap: on
line diff
--- 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]