Hirohito Higashi wrote:
> Hi Bram and Vim developers,
>
> I received a bug report from Hideto Kihara on vim-jp.
>
> Vim 7.4.250 on Fedora19 (64bit)
>
> [Pattern #1]
> How to reproduce.
> $ vim -N -u NONE
> :autocmd BufAdd x bwipeout! | call setline(1, repeat([repeat('x', 1000)],
> 10000))
> :edit x
>
> Expected behavior
> Display an unnamed buffer that was filled with x.
>
> Actual behavior
> SEGV
>
> Solution
> - I adds buffer validation check after apply_autocmds() in buflist_new().
> Like below:
> if (!buf_valid(buf))
> return NULL;
>
> - When deleting the buffer in autocmd_busy is TRUE, Pending vim_free(buf) and
> remember buf. I do free when autocmd_busy became FALSE.
> Prevent erroneous judgment of 'buf_valid(buf)', When being reused buf
> address in autocommand.
> (It's rare case. But a thing that happens.)
>
>
> ------------
> [Pattern #2]
> How to reproduce.
> $ vim -N -u NONE
> :autocmd BufAdd z bwipeout! | edit w
> :edit x
> :new y
> :edit z
>
> Expected behavior
> Display an new buffer z.
> And listed buffer is z, x and w. (x is alternate buffer)
>
> Actual behavior
> SEGV
>
> Solution
> - I update oldwin and old_curbuf after buflist_new() in do_ecmd().
>
>
> I attached a patch.
> Please check this.
>
> Thanks for reading my crazy English.
Thanks for the patch. Looks like a good solution, I'll include it.
--
hundred-and-one symptoms of being an internet addict:
36. You miss more than five meals a week downloading the latest games from
Apogee.
/// 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.