Patch 8.1.1898
Problem:    Crash when out of memory during startup.
Solution:   When out of memory message given during initialisation bail out.
            (closes #4842)
Files:      src/misc2.c


*** ../vim-8.1.1897/src/misc2.c 2019-08-20 20:13:40.326821952 +0200
--- src/misc2.c 2019-08-20 22:42:20.416826732 +0200
***************
*** 1014,1027 ****
  {
      if (!did_outofmem_msg)
      {
!       /* Don't hide this message */
        emsg_silent = 0;
  
!       /* Must come first to avoid coming back here when printing the error
!        * message fails, e.g. when setting v:errmsg. */
        did_outofmem_msg = TRUE;
  
        semsg(_("E342: Out of memory!  (allocating %lu bytes)"), (long_u)size);
      }
  }
  
--- 1014,1032 ----
  {
      if (!did_outofmem_msg)
      {
!       // Don't hide this message
        emsg_silent = 0;
  
!       // Must come first to avoid coming back here when printing the error
!       // message fails, e.g. when setting v:errmsg.
        did_outofmem_msg = TRUE;
  
        semsg(_("E342: Out of memory!  (allocating %lu bytes)"), (long_u)size);
+ 
+       if (starting == NO_SCREEN)
+           // Not even finished with initializations and already out of
+           // memory?  Then nothing is going to work, exit.
+           mch_exit(123);
      }
  }
  
*** ../vim-8.1.1897/src/version.c       2019-08-21 12:54:15.046419049 +0200
--- src/version.c       2019-08-21 13:05:55.679285440 +0200
***************
*** 767,768 ****
--- 767,770 ----
  {   /* Add new patch number below this line */
+ /**/
+     1898,
  /**/

-- 
>From "know your smileys":
 @:-()  Elvis Presley

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201908211107.x7LB7XRu007655%40masaka.moolenaar.net.

Raspunde prin e-mail lui