Loading ...
Sorry, an error occurred while loading the content.
 

Re: A way to crash vim with setloclist()

Expand Messages
  • Marcin Szamotulski
    ... The patch is working here. Thanks, Marcin -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are
    Message 1 of 5 , Nov 2, 2012
      On 10:58 Fri 02 Nov , Bram Moolenaar wrote:
      >
      > Christian Brabandt wrote:
      >
      > > Hi Bram!
      > >
      > > On So, 28 Okt 2012, Bram Moolenaar wrote:
      > >
      > > >
      > > > Marcin Szamotulski wrote:
      > > >
      > > > > Here is a way to crash vim (vim -u NONE --noplugin).
      > > > >
      > > > > Set an autocommand:
      > > > >
      > > > > au BufUnload * :call setloclist(0, [{'bufnr':1, 'lnum':1, 'col':1, 'text': 'tango down'}])
      > > > >
      > > > > Now run:
      > > > >
      > > > > :lvimgrep /.*/ *.txt
      > > > >
      > > > > And vim goes down.
      > > >
      > > > I can reproduce it.
      > > >
      > > > > Should lvimgrep trigger BufUnload autocommands? Where it is useful?
      > > >
      > > > Vimgrep works by loading the file into a buffer. That triggers
      > > > autocommands to be able to search in compressed files and handles
      > > > encoding conversions. BufUnload may be needed to undo the effect of
      > > > BufRead autocommands.
      > > >
      > > > I'll put this on the todo list, but it's unlikely that I will be able to
      > > > fix it soon. I hope someone can make a patch.
      > >
      > > Here is a patch including a test.
      >
      > Great, thanks.
      >
      >
      > --
      > "How is your new girlfriend?"
      > "90-60-90 man!"
      > "What, pale purple?"
      >
      > /// Bram Moolenaar -- Bram@... -- 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

      The patch is working here.

      Thanks,
      Marcin

      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.