Yegappan wrote:
> >> On Sat, Apr 15, 2017 at 6:26 AM, Bram Moolenaar <[email protected]> wrote:
> >> >
> >> > Dominique wrote:
> >> >
> >> >> afl-fuzz found this case which causes use of
> >> >> free memory in vim-8.0563 and older:
> >> >>
> >> >> $ cat bug.vim
> >> >> set efm=E,%W%m,
> >> >> cgetexpr ['C']
> >> >> set efm=%C%m
> >> >> lexpr '0'
> >> >> lopen
> >> >> call setqflist([], 'r')
> >> >> caddbuf
> >> >>
> >> >> $valgrind vim -u NONE -N -S bug.vim 2> vg.log
> >> >>
> >> >> Doing a git bissection, I see that it's
> >> >> a regression introduced by patch 7.4.1980:
> >> >>
> >> >> ===
> >> >> commit 361c8f0e517e41f1f1d34dae328044406fde80ac
> >> >> Author: Bram Moolenaar <[email protected]>
> >> >> Date: Sat Jul 2 15:41:47 2016 +0200
> >> >>
> >> >> patch 7.4.1980
> >> >> Problem: 'errorformat' is parsed for every call to ":caddexpr".
> >> >> Can't add
> >> >> to two location lists asynchronously.
> >> >> Solution: Keep the previously parsed data when appropriate.
> >> >> (mostly by
> >> >> Yegappan Lakshmanan)
> >> >> ===
> >> >
> >> > Thanks. Looks it happens because of not resetting qf_last.
> >> > I made a patch.
> >> >
> >>
> >> I just started looking into this. By that time, you have already
> >> sent out the patch :-).
> >
> > I'm probably faster because I'm in a train :-).
> >
>
> While trying to convert the above into a test case, I noticed
> a problem. After executing the following sequence of commands,
> two quickfix lists should be present. But only one is present.
> This is because qf_multiline is not set to false.
>
> cgetexpr ["Red", "Green", "Blue"]
> set efm=%W%m
> cgetexpr ["BSD", "Linux", "GNU"]
> set efm=%C%m
> lexpr ["One", "Two", "Three"]
> lopen
> call setqflist([], 'r')
> caddbuf
>
> The attached patch fixes this problem. I have also added some other
> additional test cases.
Thanks!
--
A computer programmer is a device for turning requirements into
undocumented features. It runs on cola, pizza and Dilbert cartoons.
Bram Moolenaar
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.