summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-14 21:15:58 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-14 21:15:58 +0200
commitb2c8750c4e95f64a8dff912af81e13318b3f6ed6 (patch)
tree55be4c79f21f17a5f97ecad64efefa47c808b41c /src/testdir/test_autocmd.vim
parentac8069bb63c5954c787fe93b7a9265de3c0c6853 (diff)
patch 8.0.1193: crash when wiping out a buffer after using getbufinfo()v8.0.1193
Problem: Crash when wiping out a buffer after using getbufinfo(). (Yegappan Lakshmanan) Solution: Remove b:changedtick from the buffer variables.
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index d0564f3866..49388a1a7a 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -769,10 +769,14 @@ func Test_BufLeave_Wipe()
bwipe!
call assert_equal(1, line('$'))
call assert_equal('', bufname('%'))
- call assert_equal(1, len(getbufinfo()))
+ let g:bufinfo = getbufinfo()
+ call assert_equal(1, len(g:bufinfo))
call delete('Xxx1')
call delete('Xxx2')
%bwipe
au! BufLeave
+
+ " check that bufinfo doesn't contain a pointer to freed memory
+ call test_garbagecollect_now()
endfunc