On Sat, Sep 13, 2008 at 4:09 PM, Bram Moolenaar wrote: > Dominique Pelle wrote: > >> Valgrind memory checker finds a memory leak in Vim-7.2.15. >> The steps to reproduce are a bit too messy to describe here >> and I have not been able to find a simple way to reproduce it. >> However I can reproduce it 100% of the time: > > Perhaps this happens when undo is disabled?
It happened when I did: :argdo %s/foo/bar/g The substitute command tried to modify a readonly file which triggered perforce plugin to ask to checkout the file, I pressed ctrl-c to interrupt. Then when exiting I found the leak. I could reproduce it all the time. Perhaps the argdo is not necessary, I won't have access to my development machine for a few weeks to try anything. But the bug is pretty clear from looking at the code anyway I think. A printf confirmed that leak happened when u_savesub(lnum) at line 4993 returned != OK and break statement at line 4994 caused the leak: 4993 if (u_savesub(lnum) != OK) !4994 break; -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
