Dominique Pellé wrote:

> I now understand why vim-7.3a crashes when undefining line
> #define U_USE_MALLOC 1  in  "undo.c".
> 
> u_alloc_line() and u_free_line(), which are used when
> U_USE_MALLOC is undefined, use buffers inside 'curbuf'.
> All allocations make during in u_read_undo() gets freed
> when calling "u_blockfree(curbuf);".
> 
> Attached patch makes it work I think (I did not test in details)
> by calling u_blockfree(curbuf) earlier (before any call to U_ALLOC_LINE())
> in u_read_undo().
> 
> However, I DON'T THINK IT'S A GOOD IDEA TO APPLY THIS PATCH
> anyway since if an error happens while loading the persistent undo file,
> the current undo information would be lost!
> 
> It's best and a lot simpler to just remove all code in
> #define U_USE_MALLOC which is not currently used anyway
> and no longer valid.

I have deleted the !U_USE_MALLOC code.  I don't see a good reason to
keep it around.  So the crash you reported won't need to be fixed.

-- 
hundred-and-one symptoms of being an internet addict:
119. You are reading a book and look for the scroll bar to get to
     the next page.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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

Raspunde prin e-mail lui