summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-06-10 19:49:14 +0200
committerBram Moolenaar <Bram@vim.org>2016-06-10 19:49:14 +0200
commite429e70f050cb2941f1f8427cf918b68444c904e (patch)
tree7e5b709acc55c49332464d487c0463843c51af3d
parent1610d052413e0ed664498853a47acc2d677a22d1 (diff)
patch 7.4.1914v7.4.1914
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.
-rw-r--r--src/os_unix.c8
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 4b2c99e85e..f08adc58b1 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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();
diff --git a/src/version.c b/src/version.c
index 563ac9f1ae..4a2d5378a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1914,
+/**/
1913,
/**/
1912,