comparison src/testdir/test_autocmd.vim @ 23843:d97258eca25d v8.2.2463

patch 8.2.2463: using :arglocal in an autocommand may use freed memory Commit: https://github.com/vim/vim/commit/6bcb877ec19a647443195a54eeac60cb693fd827 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 3 21:23:29 2021 +0100 patch 8.2.2463: using :arglocal in an autocommand may use freed memory Problem: Using :arglocal in an autocommand may use freed memory. (houyunsong) Solution: Check if the arglist is locked.
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Feb 2021 21:30:04 +0100
parents bb2afcad503b
children 7517eb94239b
comparison
equal deleted inserted replaced
23842:cfb7e7e26037 23843:d97258eca25d
2715 augroup END 2715 augroup END
2716 augroup! aucmd_win_test 2716 augroup! aucmd_win_test
2717 %bwipe! 2717 %bwipe!
2718 endfunc 2718 endfunc
2719 2719
2720 " This was using freed memory.
2721 func Test_BufNew_arglocal()
2722 arglocal
2723 au BufNew * arglocal
2724 call assert_fails('drop xx', 'E1156:')
2725
2726 au! BufNew
2727 endfunc
2728
2720 " vim: shiftwidth=2 sts=2 expandtab 2729 " vim: shiftwidth=2 sts=2 expandtab