Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
29770:653c04c1dcf1 | 29771:c71a42be2d7f |
---|---|
1556 var Foo = {-> 'lambda'} | 1556 var Foo = {-> 'lambda'} |
1557 enddef | 1557 enddef |
1558 defcompile | 1558 defcompile |
1559 END | 1559 END |
1560 v9.CheckScriptFailure(lines, 'E1073:') | 1560 v9.CheckScriptFailure(lines, 'E1073:') |
1561 enddef | |
1562 | |
1563 def Test_lambda_split() | |
1564 # this was using freed memory, because of the split expression | |
1565 var lines =<< trim END | |
1566 vim9script | |
1567 try | |
1568 0 | |
1569 0->(0 | |
1570 ->a.0( | |
1571 ->u | |
1572 END | |
1573 v9.CheckScriptFailure(lines, 'E1050:') | |
1561 enddef | 1574 enddef |
1562 | 1575 |
1563 def Test_fixed_size_list() | 1576 def Test_fixed_size_list() |
1564 # will be allocated as one piece of memory, check that changes work | 1577 # will be allocated as one piece of memory, check that changes work |
1565 var l = [1, 2, 3, 4] | 1578 var l = [1, 2, 3, 4] |