On Tue, Nov 16, 2010 at 2:35 PM, Kevin Klement <[email protected]> wrote: > Thanks for looking into this. > > I've removed all manually installed filetype plugins (--I didn't go so > far as to change or remove the default ones--), and created a single > one inside: > > ~/.vim/ftplugin/ > > named "html.vim" consisting of a single line: > > setlocal autochdir > > (it works with "set autochdir" too, and seems to work with variants of > lcd ...) too. > > This line by itself seems to create the problem. In fact, I've never > used a third-party html plugin, and the only other things I've ever > had in my html.vim are relatively benign keymaps. > > In that case, the following seems to generate the problem most of the time. > > ~/tmp $ vim -u NONE -N > :filetype plugin on > :saveas ~/tmp/junk.html
That made it pretty easy to reproduce. As the attached valgrind log shows, the src variable in home_replace is pointing to free'd memory. This appears to be the same memory being used by curbuf->b_sfname before running the filetype autocmd. I've attached a patch which appears to fix it, although I'm wary of the strcpy since I'm not sure we can guarantee there's enough space for the copy. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]> -- 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
vim.out
Description: Binary data
saveas.diff
Description: Binary data
