From 7ef2677ca6a57ad464753e02619f2c9a70ce004b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 14 Mar 2020 13:41:42 -0400 Subject: vim-patch:8.2.0381: using freed memory with :lvimgrep and autocommand Problem: Using freed memory with :lvimgrep and autocommand. (extracted from POC by Dominique Pelle) Solution: Avoid deleting a dummy buffer used in a window. (closes vim/vim#5777) https://github.com/vim/vim/commit/2573af3519ad062ddad647b97e32090f106f2ac1 --- src/nvim/testdir/test_quickfix.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 015f771435..35555ca9d3 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3318,6 +3318,14 @@ func Test_lvimgrep_crash() enew | only endfunc +func Test_lvimgrep_crash2() + au BufNewFile x sfind + call assert_fails('lvimgrep x x', 'E480:') + call assert_fails('lvimgrep x x x', 'E480:') + + au! BufNewFile +endfunc + " Test for the position of the quickfix and location list window func Test_qfwin_pos() " Open two windows -- cgit