aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2019-04-08 19:31:25 +0200
committerMarco Hinz <mh.codebro@gmail.com>2019-05-04 01:40:10 +0200
commitdc5f4a3cc2f7f02e1ff4ec2f67eda4fb73e7d89c (patch)
treec77fd62b0f07a740c6dca8829427f0816d8c7567 /src/nvim/testdir
parent37d666bc800d3b85986e34671efcf6c14d409f0c (diff)
downloadrneovim-dc5f4a3cc2f7f02e1ff4ec2f67eda4fb73e7d89c.tar.gz
rneovim-dc5f4a3cc2f7f02e1ff4ec2f67eda4fb73e7d89c.tar.bz2
rneovim-dc5f4a3cc2f7f02e1ff4ec2f67eda4fb73e7d89c.zip
vim-patch:8.0.1420: accessing freed memory in vimgrep
Problem: Accessing freed memory in vimgrep. Solution: Check that the quickfix list is still valid. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/3c09722600e3218905b5d4a7b635a9e6560f87b3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 896444aaaf..0f88f41678 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -2961,3 +2961,43 @@ func Test_qf_tick()
call Xqftick_tests('c')
call Xqftick_tests('l')
endfunc
+
+" The following test used to crash vim
+func Test_lbuffer_crash()
+ sv Xtest
+ augroup QF_Test
+ au!
+ au * * bw
+ augroup END
+ lbuffer
+ augroup QF_Test
+ au!
+ augroup END
+endfunc
+
+" The following test used to crash vim
+func Test_lexpr_crash()
+ augroup QF_Test
+ au!
+ au * * call setloclist(0, [], 'f')
+ augroup END
+ lexpr ""
+ augroup QF_Test
+ au!
+ augroup END
+ enew | only
+endfunc
+
+" The following test used to crash Vim
+func Test_lvimgrep_crash()
+ sv Xtest
+ augroup QF_Test
+ au!
+ au * * call setloclist(0, [], 'f')
+ augroup END
+ lvimgrep quickfix test_quickfix.vim
+ augroup QF_Test
+ au!
+ augroup END
+ enew | only
+endfunc