I wrote:
> Yegappan wrote: > > > Hi Bram, > > > > On Sun, Sep 13, 2020 at 4:42 AM Bram Moolenaar <vim-dev-git...@256bit.org> > > wrote: > > > > > Can you turn the example into a test? I gave it a try but it didn't > > > trigger the error. > > > > > > > > > > > I am able to reproduce this error with the following function: > > > > =============================================== > > func Test() > > call writefile(['test1', 'test2'], 'Xfile') > > edit Xfile > > let s:bufnr = bufnr() > > call setloclist(1, [{'bufnr' : s:bufnr, 'lnum' : 1, 'text' : 'test1'}, > > \ {'bufnr' : s:bufnr, 'lnum' : 2, 'text' : 'test2'}]) > > > > augroup Test_LocList > > au! > > autocmd BufEnter * call setloclist(1, > > \ [{'bufnr' : s:bufnr, 'lnum' : 1, 'text' : 'test1'}, > > \ {'bufnr' : s:bufnr, 'lnum' : 2, 'text' : 'test2'}], 'r') > > augroup END > > > > lopen > > exe "normal j\<CR>" > > > > augroup Test_LocList > > au! > > augroup END > > call delete('Xfile') > > endfunc > > =============================================== > > Strangely, when running this under valgrind I have to change the line > with the normal command to catch the E926 error, which makes sense: > > call assert_fails('exe "normal j\<CR>"', 'E926:') > > However, when not using valgrind it reports "command did not fail". > Thus there must still be something wrong. Running with ASAN has a similar effect: The test passes and no errors are reported. I suspect both Valgrind and ASAN initialize pointers in some way, and when not doing that the error is not caught. -- A parent can be arrested if his child cannot hold back a burp during a church service. [real standing law in Nebraska, United States of America] /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202009131955.08DJtKXB1452836%40masaka.moolenaar.net.