comparison src/testdir/test_tagjump.vim @ 28913:22f743798f84 v8.2.4979

patch 8.2.4979: accessing freed memory when line is flushed Commit: https://github.com/vim/vim/commit/28d032cc688ccfda18c5bbcab8b50aba6e18cde5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 18 16:29:08 2022 +0100 patch 8.2.4979: accessing freed memory when line is flushed Problem: Accessing freed memory when line is flushed. Solution: Make a copy of the pattern to search for.
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 May 2022 17:30:03 +0200
parents 12a256140887
children c7e3721ec88f
comparison
equal deleted inserted replaced
28912:2ca7719992c9 28913:22f743798f84
1388 call assert_fails('dsplit 3 FOO', 'E387:') 1388 call assert_fails('dsplit 3 FOO', 'E387:')
1389 call assert_fails('dsplit 6 FOO', 'E388:') 1389 call assert_fails('dsplit 6 FOO', 'E388:')
1390 call assert_fails('dsplit BAR', 'E388:') 1390 call assert_fails('dsplit BAR', 'E388:')
1391 1391
1392 close! 1392 close!
1393 endfunc
1394
1395 func Test_define_search()
1396 " this was accessing freed memory
1397 new
1398 call setline(1, ['first line', '', '#define something 0'])
1399 sil norm o0
1400 sil! norm 
1401 bwipe!
1393 endfunc 1402 endfunc
1394 1403
1395 " Test for [*, [/, ]* and ]/ 1404 " Test for [*, [/, ]* and ]/
1396 func Test_comment_search() 1405 func Test_comment_search()
1397 new 1406 new