]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1914 v7.4.1914
authorBram Moolenaar <Bram@vim.org>
Fri, 10 Jun 2016 17:49:14 +0000 (19:49 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 10 Jun 2016 17:49:14 +0000 (19:49 +0200)
Problem:    Executing autocommands while using the signal stack has a high
            chance of crashing Vim.
Solution:   Don't invoke autocommands when on the signal stack.

src/os_unix.c
src/version.c

index 4b2c99e85e61d5dc4e895922d7adfc8795b8254f..f08adc58b1594362fa80a8952faafafc8b687c4c 100644 (file)
@@ -1090,6 +1090,12 @@ deathtrap SIGDEFARG(sigarg)
     /* Remember how often we have been called. */
     ++entered;
 
+#ifdef FEAT_AUTOCMD
+    /* Executing autocommands is likely to use more stack space than we have
+     * available in the signal stack. */
+    block_autocmds();
+#endif
+
 #ifdef FEAT_EVAL
     /* Set the v:dying variable. */
     set_vim_var_nr(VV_DYING, (long)entered);
@@ -1171,6 +1177,8 @@ deathtrap SIGDEFARG(sigarg)
      * calling free(). */
     preserve_exit();
 
+    /* NOTREACHED */
+
 #ifdef NBDEBUG
     reset_signals();
     may_core_dump();
index 563ac9f1aeadfe13da5a38e38bc805e4ecb029fa..4a2d5378a7902c576b0b450c55c8c16f45f33f2c 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1914,
 /**/
     1913,
 /**/