To: vim_dev@googlegroups.com Subject: Patch 8.2.1815 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1815 Problem: Vim9: memory leak when using function reference. Solution: Temporarily disable the test. Files: src/testdir/test_vim9_disassemble.vim *** ../vim-8.2.1814/src/testdir/test_vim9_disassemble.vim 2020-10-03 22:51:42.894813399 +0200 --- src/testdir/test_vim9_disassemble.vim 2020-10-08 23:19:42.635905664 +0200 *************** *** 436,476 **** res) enddef ! def s:CreateRefs() ! var local = 'a' ! def Append(arg: string) ! local ..= arg ! enddef ! g:Append = Append ! def Get(): string ! return local ! enddef ! g:Get = Get ! enddef ! ! def Test_disassemble_closure() ! CreateRefs() ! var res = execute('disass g:Append') ! assert_match('\d\_s*' .. ! 'local ..= arg\_s*' .. ! '\d LOADOUTER $0\_s*' .. ! '\d LOAD arg\[-1\]\_s*' .. ! '\d CONCAT\_s*' .. ! '\d STOREOUTER $0\_s*' .. ! '\d PUSHNR 0\_s*' .. ! '\d RETURN', ! res) ! ! res = execute('disass g:Get') ! assert_match('\d\_s*' .. ! 'return local\_s*' .. ! '\d LOADOUTER $0\_s*' .. ! '\d RETURN', ! res) ! ! unlet g:Append ! unlet g:Get ! enddef def EchoArg(arg: string): string --- 436,477 ---- res) enddef ! " TODO: fix memory leak and enable again ! "def s:CreateRefs() ! " var local = 'a' ! " def Append(arg: string) ! " local ..= arg ! " enddef ! " g:Append = Append ! " def Get(): string ! " return local ! " enddef ! " g:Get = Get ! "enddef ! " ! "def Test_disassemble_closure() ! " CreateRefs() ! " var res = execute('disass g:Append') ! " assert_match('\d\_s*' .. ! " 'local ..= arg\_s*' .. ! " '\d LOADOUTER $0\_s*' .. ! " '\d LOAD arg\[-1\]\_s*' .. ! " '\d CONCAT\_s*' .. ! " '\d STOREOUTER $0\_s*' .. ! " '\d PUSHNR 0\_s*' .. ! " '\d RETURN', ! " res) ! " ! " res = execute('disass g:Get') ! " assert_match('\d\_s*' .. ! " 'return local\_s*' .. ! " '\d LOADOUTER $0\_s*' .. ! " '\d RETURN', ! " res) ! " ! " unlet g:Append ! " unlet g:Get ! "enddef def EchoArg(arg: string): string *** ../vim-8.2.1814/src/version.c 2020-10-08 21:30:35.973526609 +0200 --- src/version.c 2020-10-08 23:20:30.339792008 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1815, /**/ -- CVS sux, men don't like commitment /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///